import{u as v,j as s,c as $,Q as C,t as e,v as y,R as z,f as j,b3 as F}from"./index-iQt3bUih.js";function D({title:o,image:p,titleExtra:N,desc:i,installed:a,version:r,running:x,busy:t,busyLabel:h,onInstall:n,installLabel:g,updateLabel:w,installTitle:k,onInstallBeta:f,enabled:l,runtimeState:d,onToggleEnabled:m,latestVersion:c,note:b,children:u}){return v(),s.jsxs("div",{className:`${$} mod-install-visual-card flex flex-wrap items-center justify-between gap-3`,children:[p&&s.jsx("img",{className:"mod-install-cover",src:p,alt:`${o} 模組預覽圖`}),s.jsxs("div",{className:"inline-flex min-w-0 flex-wrap items-center gap-2",children:[s.jsx("span",{className:"text-sm font-extrabold text-ink-muted",children:o}),N,a&&s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border-[1.5px] border-grass/40 bg-grass/15 px-3 py-1 text-xs font-bold text-grass",children:[s.jsx(C,{className:"size-3.5"}),e("已安裝"),r?` ${r}`:""]}),a&&l===!1&&s.jsx("span",{className:"rounded-full border-[1.5px] border-line bg-card-soft px-3 py-1 text-xs font-bold text-ink-muted",children:e("已停用")}),a&&l!==!1&&d==="loaded"&&s.jsx("span",{className:"rounded-full border-[1.5px] border-grass/40 bg-grass/15 px-3 py-1 text-xs font-bold text-grass",children:"本次開服已載入"}),a&&l!==!1&&d==="not-loaded"&&s.jsx("span",{className:"rounded-full border-[1.5px] border-red-400/50 bg-red-50 px-3 py-1 text-xs font-bold text-red-700",children:"已設定啟用，但本次程序未載入"}),a&&l!==!1&&d==="stopped"&&s.jsx("span",{className:"rounded-full border-[1.5px] border-line bg-card-soft px-3 py-1 text-xs font-bold text-ink-muted",children:"已設定啟用・待下次開服驗證"}),a&&l!==!1&&d==="unknown"&&s.jsx("span",{className:"rounded-full border-[1.5px] border-amber-400/50 bg-amber-50 px-3 py-1 text-xs font-bold text-amber-800",children:"已設定啟用・無法讀取程序載入狀態"}),a&&r&&c&&c!==r&&s.jsx("span",{className:"rounded-full border-[1.5px] border-sun/40 bg-sun/10 px-3 py-1 text-xs font-bold text-sun",title:e("改版後模組常需更新才相容;按「更新到最新版」升級"),children:e("有新版 {v}",{v:c})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n&&s.jsxs("button",{className:`${y} inline-flex items-center gap-1.5`,onClick:n,disabled:t||x,title:x?e("請先停止伺服器"):k,children:[s.jsx(z,{className:"size-4"}),t?h??e("安裝中…"):a?w??e("更新到最新版"):g??e("安裝穩定版")]}),f&&s.jsx("button",{className:`${j} inline-flex items-center gap-1.5`,onClick:f,disabled:t||x,title:x?e("請先停止伺服器"):e("安裝最新測試版(含較新功能,可能不穩定)"),children:e("安裝測試版")}),a&&m&&s.jsxs("button",{className:`${j} inline-flex items-center gap-1.5`,onClick:m,disabled:t||x,title:x?e("請先停止伺服器"):l===!1?e("重新啟用(把 DLL 改回原名)"):e("暫時停用不刪檔:改版後模組不相容時的安全退路,Lua/設定檔都會保留"),children:[s.jsx(F,{className:"size-4"}),t?e("處理中…"):l===!1?e("啟用"):e("停用")]})]}),i&&s.jsx("p",{className:"w-full text-[13px] text-ink-muted",children:i}),u&&s.jsx("div",{className:"w-full",children:u}),b&&s.jsx("p",{className:"w-full text-xs text-ink-muted",children:b})]})}export{D as M};
