import{jsx as e,jsxs as n}from"react/jsx-runtime";import{d as o,b as c,e as i}from"./table-BrXe3s2z.js";import{B as s}from"./badge-CFi7bqqA.js";import{B as r}from"./button-BvFBRYHq.js";import{Link as m}from"@inertiajs/react";import{PowerOff as p,Power as f,Pencil as v,Trash2 as u}from"lucide-react";import{a as g,g as x}from"./shop-helpers-CW6YR2iv.js";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";import"@radix-ui/react-slot";import"class-variance-authority";function I({items:t,masks:l,onToggle:d,onDelete:h}){return t.length===0?e(o,{children:e(c,{children:e(i,{colSpan:8,className:"text-center text-muted-foreground py-8",children:'No shop items found. Click "Create Item" to add one.'})})}):e(o,{children:t.map(a=>n(c,{children:[e(i,{className:"font-mono",children:a.item_id}),e(i,{children:a.item_name||"Unknown"}),e(i,{className:"max-w-[200px] truncate",title:a.description||"-",children:a.description||"-"}),e(i,{children:a.count}),e(i,{className:"font-mono",children:g(a.price)}),e(i,{children:e(s,{variant:"outline",children:x(a.mask,l)})}),e(i,{children:e(s,{variant:a.is_active?"default":"secondary",children:a.is_active?"Active":"Inactive"})}),e(i,{className:"text-right",children:n("div",{className:"flex justify-end gap-2",children:[e(r,{variant:"ghost",size:"icon",onClick:()=>d(a),title:a.is_active?"Deactivate":"Activate",children:a.is_active?e(p,{className:"h-4 w-4 text-orange-500"}):e(f,{className:"h-4 w-4 text-green-500"})}),e(m,{href:`/admin/shop/${a.id}/edit`,children:e(r,{variant:"ghost",size:"icon",children:e(v,{className:"h-4 w-4"})})}),e(r,{variant:"ghost",size:"icon",onClick:()=>h(a),children:e(u,{className:"h-4 w-4 text-destructive"})})]})})]},a.id))})}export{I as ShopItemsTable};
