var o=Object.defineProperty;var n=(i,e,s)=>e in i?o(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s;var t=(i,e,s)=>n(i,typeof e!="symbol"?e+"":e,s);import{a2 as r}from"./DpdQcRr7.js";class m{constructor(e={}){t(this,"id");t(this,"userId");t(this,"name");t(this,"projectName");t(this,"description");t(this,"packageName");t(this,"minecraftVersion");t(this,"modLoader");t(this,"modTemplateId");t(this,"selectedQuestId");t(this,"version");t(this,"lastSyncedAt");t(this,"gcsPath");t(this,"content");t(this,"isShared");t(this,"thumbnailUrl");t(this,"isOwner");t(this,"isDeleted");t(this,"playCount");t(this,"author");t(this,"createdAt");t(this,"updatedAt");this.id=Number(e.id),this.userId=Number(e.userId||e.user_id),this.name=e.name||"",this.projectName=e.projectName||e.project_name||void 0,this.description=e.description||void 0,this.packageName=e.packageName||e.package_name||"",this.minecraftVersion=e.minecraftVersion||e.minecraft_version||"",this.modLoader=e.modLoader||e.mod_loader||"",this.modTemplateId=e.modTemplateId||e.mod_template_id||void 0,this.selectedQuestId=e.selectedQuestId??e.selected_quest_id??void 0,this.version=e.version||"1.0.0",this.lastSyncedAt=e.lastSyncedAt||e.last_synced_at?r(e.lastSyncedAt||e.last_synced_at):void 0,this.gcsPath=e.gcsPath||e.gcs_path||"",this.content=e.content||void 0,this.isShared=!!(e.isShared??e.is_shared??!1),this.thumbnailUrl=e.thumbnailUrl||e.thumbnail_url||void 0,this.isOwner=!!(e.isOwner??e.is_owner??!0),this.isDeleted=!!(e.isDeleted??e.is_deleted??!1),this.playCount=Number(e.playCount??e.play_count??0);const s=e.author;this.author=s?{id:Number(s.id),name:s.name||void 0,profileImageUrl:s.profileImageUrl||s.profile_image_url||void 0}:void 0,this.createdAt=r(e.createdAt||e.created_at),this.updatedAt=r(e.updatedAt||e.updated_at)}get displayName(){return this.projectName||this.name}get statusLabel(){return this.isDeleted?"削除済み":"アクティブ"}get statusClass(){return this.isDeleted?"deleted":"active"}get lastSyncedAtFormatted(){return this.lastSyncedAt?this.lastSyncedAt.format("YYYY/MM/DD HH:mm"):"未同期"}get createdAtFormatted(){return this.createdAt.format("YYYY/MM/DD HH:mm")}get updatedAtFormatted(){return this.updatedAt.format("YYYY/MM/DD HH:mm")}}t(m,"ModelName","Project");export{m as P};
