import{jsxs as r,jsx as e,Fragment as c}from"react/jsx-runtime";import{C as n,b as o,c as m,d as g,a as p}from"./card-Zg0WOx-j.js";import{S as h}from"./separator-BDLxzoJ8.js";import{Loader2 as u,Package as f,Coins as x}from"lucide-react";import{f as N}from"./shop-helpers-CW6YR2iv.js";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"@radix-ui/react-separator";function L({item:b,formData:t,itemName:a,itemColor:d,isLoadingItemName:l}){return r(n,{children:[r(o,{children:[e(m,{className:"text-lg",children:"Item Preview"}),e(g,{children:"Current item information"})]}),r(p,{className:"space-y-4",children:[r("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-muted/50 border",children:[e("div",{className:"w-16 h-16 bg-background rounded-lg border flex items-center justify-center overflow-hidden",children:e("img",{src:`/img/Icons/${t.item_id}.png`,alt:a||"Item",className:"w-full h-full object-cover",onError:s=>{const i=s.target;i.src="/img/logo/logo.png",i.className="w-10 h-10 opacity-50"}})}),e("div",{className:"flex-1 min-w-0",children:l?r("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(u,{className:"h-4 w-4 animate-spin"}),e("span",{children:"Loading..."})]}):r(c,{children:[e("p",{className:"font-semibold truncate",style:{color:d?`#${d}`:void 0},children:a||"Unknown Item"}),r("p",{className:"text-sm text-muted-foreground",children:["ID: ",t.item_id]})]})})]}),e(h,{}),r("div",{className:"grid grid-cols-2 gap-3",children:[r("div",{className:"p-3 rounded-lg bg-muted/30 border",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-xs mb-1",children:[e(f,{className:"h-3 w-3"}),"Quantity"]}),e("p",{className:"font-bold text-lg",children:t.count})]}),r("div",{className:"p-3 rounded-lg bg-muted/30 border",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-xs mb-1",children:[e(x,{className:"h-3 w-3"}),"Price"]}),e("p",{className:"font-bold text-lg text-yellow-600 dark:text-yellow-400",children:N(t.price)})]})]})]})]})}export{L as ItemPreviewCard};
