import{jsxs as t,jsx as e}from"react/jsx-runtime";import{C as g}from"./character-inventory-panel-FBM6NEor.js";import{C as y,g as w}from"./class-icon-CASn9-jM.js";import{A as a,a as s}from"./alert-CsSMIr96.js";import{C as D,a as A}from"./card-Zg0WOx-j.js";import{F as L}from"./layout-kzl3pk8B.js";import{Head as I,Link as P}from"@inertiajs/react";import{ArrowLeft as S,AlertCircle as m,Coins as T}from"lucide-react";import{useState as j}from"react";import"./input-qMvM9qch.js";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"./app-sidebar-header-BX2s-HO_.js";import"@radix-ui/react-collapsible";import"./dropdown-menu-BP80qPHw.js";import"@radix-ui/react-dropdown-menu";import"./app-logo-icon-beRg1XGs.js";import"./fonts-CqawFh47.js";import"@radix-ui/react-slot";import"class-variance-authority";import"./button-BvFBRYHq.js";import"@radix-ui/react-dialog";import"@radix-ui/react-tooltip";import"@radix-ui/react-avatar";import"../app.js";/* empty css     */import"axios";import"sonner";import"react-dom/client";import"./item-database-BBfxV-PC.js";import"./main-CWwoxgdq.js";import"./toaster-DuLpwsc2.js";import"./WelcomeModal-BFw-aFh5.js";import"./dialog-BfGkTFdF.js";import"./label-DMnntKPk.js";import"@radix-ui/react-label";import"./checkbox-DXBO59MA.js";import"@radix-ui/react-checkbox";const k=[{title:"Dashboard",href:"/dashboard"},{title:"Online Players",href:"/dashboard/online"},{title:"Character Details",href:"#"}];function ve({serverOnline:i,character:r,equipment:l,pocket:n,storehouse:d,dress:p,material:c,generalcard:h,pocketCapacity:f=32,storehouseCapacity:u=32,pocketMoney:x=0,storehouseMoney:C=0,userCash:v=0,error:o}){const[N,b]=j("store");return t(L,{breadcrumbs:k,children:[e(I,{title:r?`${r.name} - Character Details`:"Character Details"}),t("div",{className:"space-y-6",children:[t(P,{href:"/dashboard/online",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-2 text-sm transition-colors",children:[e(S,{className:"h-4 w-4"}),"Back to Online Players"]}),!i&&t(a,{variant:"destructive",children:[e(m,{className:"h-4 w-4"}),e(s,{children:"The server is currently offline. Character information is not available."})]}),o&&t(a,{variant:"destructive",children:[e(m,{className:"h-4 w-4"}),e(s,{children:o})]}),r&&e(D,{children:e(A,{className:"p-4",children:t("div",{className:"flex items-center justify-between",children:[t("div",{className:"flex items-center gap-4",children:[e(y,{classId:r.class,size:"lg"}),t("div",{children:[e("h2",{className:"text-xl font-bold",children:r.name}),t("p",{className:"text-muted-foreground text-sm",children:["Level ",r.level," • ",w(r.class)]})]})]}),t("div",{className:"flex items-center gap-2",children:[e(T,{className:"h-5 w-5 text-amber-500"}),t("div",{className:"text-right",children:[e("div",{className:"text-muted-foreground text-xs",children:"IM Coin"}),e("div",{className:"text-lg font-bold",children:v.toLocaleString()})]})]})]})})}),i&&r&&e(g,{equipment:l,pocket:n,storehouse:d,dress:p,material:c,generalcard:h,pocketCapacity:f,storehouseCapacity:u,pocketMoney:x,storehouseMoney:C,editable:!0,storehouseTab:N,onStorehouseTabChange:b})]})]})}export{ve as default};
