1import{u as P,j as e,H as B,b as r,L as x,B as h,a as u}from"./app-czhrZuOt.js";import{A as _}from"./AuthenticatedLayout-6D4-8ZXI.js";import{I as k}from"./input-DhKi0PtU.js";import{P as A}from"./pagination-C4hxBpNM.js";import{C as i,a as l,b as n,d as c}from"./card-ycwGpo2O.js";import{T as H,a as I,b as f,c as a,d as R,e as t}from"./table-y6QH7p-L.js";import{P as p}from"./package-D49S5_8A.js";import{L as z}from"./layers-Brk8UMAh.js";import{S as v}from"./star-BOynVrI_.js";import{T as L}from"./trending-up-DmCkrz73.js";import{R as q}from"./refresh-cw-D9lrbHU5.js";import{P as y}from"./plus-pGk13rni.js";import{S as E}from"./search-IpzEnTxE.js";import{E as U}from"./eye-C8Ic4pOz.js";import{S as D}from"./square-pen-CgKBa_hF.js";import{T as F}from"./trash-2-B6Uv-xm-.js";import"./dropdown-menu-T8nPhRxM.js";import"./separator-CM9ztqRx.js";import"./tooltip-3gnCrGQ_.js";import"./index-CO3-bHtI.js";import"./panel-left-DywVwufr.js";import"./index-D-VcYgw1.js";import"./index-BsdkFYOj.js";import"./chevron-right-_RgHfVVh.js";import"./check-Bzl7AoUV.js";import"./user-Cx88PRXH.js";import"./log-out-BV2MZW-s.js";import"./users-VKYAyUQI.js";import"./building-2-CQaiStI9.js";import"./link-2-CAXTgPYN.js";import"./credit-card-C4J_JGuh.js";import"./file-text-Bi2d3tkT.js";import"./mail-DsdayFHQ.js";import"./settings-2-CmYOCYr6.js";import"./qr-code-DEyAAUat.js";import"./WhiteLabelContext-Kdbp7x-_.js";import"./mouse-pointer-click-B2tfKS3S.js";import"./megaphone-DH05MufU.js";import"./globe-B14JyJ6A.js";import"./target-9uU5Ku0L.js";import"./share-2-lpd8gAKY.js";import"./activity-kIEKR-Ok.js";import"./settings-49ePZpss.js";import"./chart-column-CXVdYvL2.js";import"./languages-CRXfoD92.js";import"./user-plus-BUFA6_Xe.js";import"./LanguageSelector-B1YS7AsG.js";import"./chevron-down-xMu7kuEX.js";import"./FooterSocialLinks-a8x94R2Q.js";import"./ThemeToggle-BE__v9EI.js";import"./bell-e_q56CXD.js";import"./FlashNotification-DC-gGBqa.js";import"./circle-check-BSbw1c6G.js";import"./triangle-alert-BbNR7tvC.js";import"./chevron-left-BTUL4gKv.js";function Qe(){const m=P().props,w=m.ui??{},o=m.bundles,d=m.stats,g=m.ziggy?.query||{},b=String(g.search??""),N=s=>{u.get(route("admin.central-payment.bundles.index"),{...g,...s},{preserveScroll:!0,preserveState:!0})},j=(s,C)=>new Intl.NumberFormat("en-US",{style:"currency",currency:C}).format(s),T=s=>{confirm(`Are you sure you want to delete "${s.name}"?`)&&u.delete(route("admin.central-payment.bundles.destroy",s.id))},S=s=>{u.post(route("admin.central-payment.bundles.toggle",s.id))};return e.jsxs(_,{children:[e.jsx(B,{title:w.title??"Product Bundles"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[e.jsxs(i,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(n,{className:"text-sm font-medium",children:"Total Bundles"}),e.jsx(p,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(c,{children:e.jsx("div",{className:"text-2xl font-bold",children:d.total})})]}),e.jsxs(i,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(n,{className:"text-sm font-medium",children:"Active"}),e.jsx(z,{className:"h-4 w-4 text-green-600"})]}),e.jsx(c,{children:e.jsx("div",{className:"text-2xl font-bold text-green-600",children:d.active})})]}),e.jsxs(i,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(n,{className:"text-sm font-medium",children:"Featured"}),e.jsx(v,{className:"h-4 w-4 text-yellow-600"})]}),e.jsx(c,{children:e.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:d.featured})})]}),e.jsxs(i,{children:[e.jsxs(l,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(n,{className:"text-sm font-medium",children:"Total Value"}),e.jsx(L,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsx(c,{children:e.jsx("div",{className:"text-2xl font-bold",children:j(d.total_value,"USD")})})]})]}),e.jsxs(i,{className:"rounded-lg",children:[e.jsx(l,{children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(p,{className:"h-6 w-6 text-muted-foreground"}),e.jsx(n,{className:"text-lg text-foreground",children:"Product Bundles"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"outline",onClick:()=>N({}),children:[e.jsx(q,{className:"mr-2 h-4 w-4"}),"Refresh"]}),e.jsx(x,{href:route("admin.central-payment.bundles.create"),children:e.jsxs(r,{children:[e.jsx(y,{className:"mr-2 h-4 w-4"}),"Create Bundle"]})})]})]})}),e.jsxs(c,{children:[e.jsx("div",{className:"mb-6 flex gap-4",children:e.jsxs("div",{className:"relative flex-1",children:[e.jsx(E,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(k,{placeholder:"Search bundles...",value:b,onChange:s=>N({search:s.target.value}),className:"pl-10"})]})}),e.jsx("div",{className:"rounded-md border",children:e.jsxs(H,{
1children:[e.jsx(I,{children:e.jsxs(f,{children:[e.jsx(a,{children:"Bundle"}),e.jsx(a,{children:"Products"}),e.jsx(a,{children:"Price"}),e.jsx(a,{children:"Type"}),e.jsx(a,{children:"Status"}),e.jsx(a,{className:"text-right",children:"Actions"})]})}),e.jsx(R,{children:o.data.length===0?e.jsx(f,{children:e.jsxs(t,{colSpan:6,className:"text-center py-8",children:[e.jsx(p,{className:"mx-auto h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No bundles found"}),e.jsx(x,{href:route("admin.central-payment.bundles.create"),children:e.jsxs(r,{variant:"outline",className:"mt-4",children:[e.jsx(y,{className:"mr-2 h-4 w-4"}),"Create your first bundle"]})})]})}):o.data.map(s=>e.jsxs(f,{children:[e.jsx(t,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:e.jsx(p,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[s.name,s.featured&&e.jsx(v,{className:"h-4 w-4 text-yellow-500 fill-yellow-500"})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s.slug})]})]})}),e.jsx(t,{children:e.jsxs(h,{variant:"outline",children:[s.products_count," ","products"]})}),e.jsxs(t,{children:[e.jsx("div",{className:"font-semibold",children:j(s.price,s.currency)}),s.original_price&&e.jsx("div",{className:"text-sm text-muted-foreground line-through",children:j(s.original_price,s.currency)})]}),e.jsx(t,{children:e.jsx(h,{variant:"secondary",children:s.type==="subscription"?"Subscription":"One-time"})}),e.jsx(t,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{variant:s.active?"default":"destructive",className:"cursor-pointer",onClick:()=>S(s),children:s.active?"Active":"Inactive"}),s.badge_text&&e.jsx(h,{variant:"outline",children:s.badge_text})]})}),e.jsx(t,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(x,{href:route("admin.central-payment.bundles.show",s.id),children:e.jsx(r,{variant:"ghost",size:"sm",children:e.jsx(U,{className:"h-4 w-4"})})}),e.jsx(x,{href:route("admin.central-payment.bundles.edit",s.id),children:e.jsx(r,{variant:"ghost",size:"sm",children:e.jsx(D,{className:"h-4 w-4"})})}),e.jsx(r,{variant:"ghost",size:"sm",onClick:()=>T(s),children:e.jsx(F,{className:"h-4 w-4 text-destructive"})})]})})]},s.id))})]})}),o.last_page>1&&e.jsx("div",{className:"mt-6",children:e.jsx(A,{links:o.links})})]})]})]})]})}export{Qe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.