var u=Object.defineProperty;var n=(s,e,i)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i;var t=(s,e,i)=>n(s,typeof e!="symbol"?e+"":e,i);import{a2 as r}from"./DpdQcRr7.js";class d{constructor(e={}){t(this,"id");t(this,"questId");t(this,"title");t(this,"description");t(this,"content");t(this,"orderIndex");t(this,"createdAt");t(this,"updatedAt");this.id=Number(e.id),this.questId=Number(e.questId||e.quest_id),this.title=e.title||"",this.description=e.description||"",this.content=e.content||"",this.orderIndex=Number(e.orderIndex??e.order_index??0),this.createdAt=r(e.createdAt||e.created_at),this.updatedAt=r(e.updatedAt||e.updated_at)}get createdAtFormatted(){return this.createdAt.format("YYYY/MM/DD HH:mm")}get updatedAtFormatted(){return this.updatedAt.format("YYYY/MM/DD HH:mm")}}t(d,"ModelName","QuestStep");const l={draft:"下書き",published:"公開中",archived:"アーカイブ"};var o=(s=>(s.A="A",s.B="B",s.C="C",s.D="D",s.E="E",s))(o||{});const h={A:"A: ワールド・エディター",B:"B: アイテム・メーカー",C:"C: プログラミング・ラボ",D:"D: マジック・コーダー",E:"E: Modパック・リリース"};class c{constructor(e={}){t(this,"id");t(this,"title");t(this,"description");t(this,"level");t(this,"requiredHour");t(this,"image");t(this,"unit");t(this,"orderIndex");t(this,"modTemplateId");t(this,"status");t(this,"deletedAt");t(this,"createdAt");t(this,"updatedAt");t(this,"questSteps");t(this,"requirementQuestIds");this.id=Number(e.id),this.title=e.title||"",this.description=e.description||"",this.level=Number(e.level??1),this.requiredHour=Number(e.requiredHour??e.required_hour??0),this.image=e.image||void 0,this.unit=e.unit||void 0,this.orderIndex=Number(e.orderIndex??e.order_index??0),this.modTemplateId=e.modTemplateId??e.mod_template_id??void 0,this.status=e.status||"draft",this.deletedAt=e.deletedAt||e.deleted_at?r(e.deletedAt||e.deleted_at):void 0,this.createdAt=r(e.createdAt||e.created_at),this.updatedAt=r(e.updatedAt||e.updated_at),this.questSteps=(e.questSteps||e.quest_steps||[]).map(i=>new d(i)),this.requirementQuestIds=e.requirementQuestIds||e.requirement_quest_ids||[]}get isDeleted(){return!!this.deletedAt}get statusLabel(){return l[this.status]||this.status}get statusClass(){return{draft:"is-warning",published:"is-success",archived:"is-light"}[this.status]||"is-light"}get unitLabel(){return this.unit?h[this.unit]||this.unit:"未設定"}get unitClass(){return this.unit&&{A:"is-link",B:"is-success",C:"is-warning",D:"is-danger",E:"is-info"}[this.unit]||"is-light"}get levelLabel(){return`レベル${this.level}`}get levelClass(){return{1:"is-success",2:"is-info",3:"is-warning",4:"is-danger",5:"is-danger"}[this.level]||"is-light"}get sortedSteps(){return[...this.questSteps].sort((e,i)=>e.orderIndex-i.orderIndex)}get stepCount(){return this.questSteps.length}get createdAtFormatted(){return this.createdAt.format("YYYY/MM/DD HH:mm")}get updatedAtFormatted(){return this.updatedAt.format("YYYY/MM/DD HH:mm")}get deletedAtFormatted(){return this.deletedAt?this.deletedAt.format("YYYY/MM/DD HH:mm"):""}}t(c,"ModelName","Quest");export{c as Q,o as a,h as b};
