import{u as N,j as e,H as f}from"./app-CyJEXGyv.js";import{A as w}from"./app-layout-DbUGBUec.js";import{b as d,f as c,d as t,h as s,c as g,e as i}from"./table-fuaFg2Mm.js";import{C as n,a as o,b as x,c as p,d as m}from"./card-BjOMVxEn.js";import{T,a as _,b as h,c as j}from"./tabs-Bz5gv7OT.js";import"./button-COEJSQkW.js";import"./utils-D3rN0LeJ.js";import"./sheet-D9YCjyPN.js";import"./index-JbHgsFAK.js";import"./index-BiS8IM9B.js";import"./x-CEXz2EER.js";import"./createLucideIcon-DqnlFWer.js";import"./index-CeYyXWc4.js";import"./index-D448AvbX.js";import"./truck-DSNzHzca.js";import"./package-Ca-wQg6n.js";import"./shopping-bag-kX2qM3ec.js";import"./app-logo-icon-bwP4qd8Q.js";import"./bluetooth-context-DlC5mQaA.js";import"./index-BtT9Eyya.js";import"./index-l-_2VD5G.js";import"./sonner-DMUJNVEP.js";import"./select-787Dhddj.js";import"./chevron-down-CelnyKCC.js";import"./input-De4RhZu7.js";const v=[{title:"Produk",href:route("apps.products.index")},{title:"Detail Produk",href:"#"}];function Y(){const{product:a,variantOptions:u}=N().props;return e.jsxs(w,{breadcrumbs:v,children:[e.jsx(f,{title:"Detail Produk"}),e.jsx("div",{className:"p-4 bg-background text-foreground transition-colors",children:e.jsx("div",{className:"border border-border bg-card text-card-foreground shadow-sm rounded-xl p-4",children:e.jsxs(T,{defaultValue:"product",children:[e.jsxs(_,{children:[e.jsx(h,{value:"product",children:"Detail Produk"}),e.jsx(h,{value:"variant",children:"Varian Produk"})]}),e.jsx(j,{value:"product",children:e.jsxs(n,{children:[e.jsxs(o,{children:[e.jsx(x,{children:"Detail Produk"}),e.jsx(p,{children:"Tabel ini digunakan untuk menampilkan detail data produk"})]}),e.jsx(m,{className:"p-0",children:e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(t,{children:[e.jsx(s,{className:"px-6 w-10 font-bold dark:text-white",children:"Gambar Produk"}),e.jsx(s,{className:"px-6",children:e.jsx("img",{src:a.image,alt:a.name,className:"w-20 h-20 object-cover"})})]}),e.jsxs(t,{children:[e.jsx(s,{className:"px-6 w-10 font-bold dark:text-white",children:"SKU"}),e.jsx(s,{className:"px-6",children:a.sku})]}),e.jsxs(t,{children:[e.jsx(s,{className:"px-6 w-10 font-bold dark:text-white",children:"Nama Produk"}),e.jsx(s,{className:"px-6",children:a.name})]}),e.jsxs(t,{children:[e.jsx(s,{className:"px-6 w-10 font-bold dark:text-white",children:"Kategori"}),e.jsx(s,{className:"px-6",children:a.category.name})]}),e.jsxs(t,{children:[e.jsx(s,{className:"px-6 w-10 font-bold dark:text-white",children:"Deskripsi"}),e.jsx(s,{className:"px-6 whitespace-normal",children:a.description})]})]})})})]})}),e.jsx(j,{value:"variant",className:"w-full",children:e.jsxs(n,{children:[e.jsxs(o,{children:[e.jsx(x,{children:"Varian Produk"}),e.jsx(p,{children:"Tabel ini digunakan untuk menampilkan variant data produk"})]}),e.jsx(m,{className:"p-0 overflow-x-auto",children:e.jsxs(d,{children:[e.jsx(g,{children:e.jsxs(t,{children:[e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Barcode"}),u.map((r,l)=>e.jsx(i,{className:"px-6 font-bold dark:text-white",children:r.name},l)),a.has_stock==!0&&e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Stok Awal"}),e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Satuan"}),e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Harga Jual"}),e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Harga Beli"}),e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Kuantitas Minimum"}),a.has_stock==!0&&e.jsx(i,{className:"px-6 font-bold dark:text-white",children:"Expired"})]})}),e.jsx(c,{children:a.variants.map((r,l)=>e.jsxs(t,{children:[e.jsx(s,{className:"px-6",children:r.barcode}),r.product_variant_values.map((k,b)=>e.jsx(s,{className:"px-6",children:k.variant_value.name},b)),a.has_stock==!0&&e.jsx(s,{className:"px-6",children:r.initial_stock.quantity}),e.jsx(s,{className:"px-6",children:r.unit.name}),e.jsxs(s,{className:"px-6",children:[e.jsx("sup",{children:"Rp"})," ",r.price]}),e.jsxs(s,{className:"px-6",children:[e.jsx("sup",{children:"Rp"})," ",r.capital_price]}),e.jsx(s,{className:"px-6",children:r.minimum_quantity}),a.has_stock==!0&&e.jsx(s,{className:"px-6",children:r.initial_stock.expired_at})]},l))})]})})]})})]})})})]})}export{Y as default};
