import{j as e,ch as d,T as n,cX as c}from"./vendor-rThclpOQ.js";import{D as x}from"./delete-modal-CrLtMjfS.js";import{T as h}from"./table-filter-YjsfaEUk.js";import{T as u}from"./table-footer-CXgex4hi.js";import{A as j,a as f,b as N,c as b}from"./accordion-by19KtHq.js";import{B as o}from"./button-ZcsoqUQn.js";import{C as g}from"./card-HXna_7vU.js";import{D as v}from"./layout-Dtu8Rjtg.js";import{P as y}from"./richtor-BYY1_E6w.js";import i from"./newsletter-form-CXn21YK8.js";import w from"./newsletter-send-C3YOURnT.js";import"./dialog-CDEDwQhm.js";import"./utils-8KAaAB9H.js";import"./use-lang-BK6P2WMc.js";import"./debounce-CWHP_ANh.js";import"./route-B4ZMN77y.js";import"./dropdown-menu-Cm0H42C1.js";import"./scroll-area-BCwyUKIK.js";import"./table-page-size-FBmivxVb.js";import"./index-DquVdLUg.js";import"./sidebar-Buyv7mEV.js";import"./separator-Cir9hccx.js";import"./sheet-BfC102Vr.js";import"./tooltip-WOIaUmuC.js";import"./main-CC75Iw88.js";import"./sonner-CgbrDmPW.js";import"./index-CWNIUFqh.js";import"./appearance-Bwg83W1G.js";import"./app-BsPpMpSR.js";/* empty css            */import"./language-BmlkXzFK.js";import"./notification-Bti7isEF.js";import"./popover-otAaS-4X.js";import"./app-logo-Bj2M2lhk.js";import"./avatar-BsP_s7dr.js";import"./input-error-Br4ngfdE.js";import"./loading-button-DKhpmf6V.js";import"./input-BeqyurrI.js";import"./label-CtY1vfZY.js";import"./inertia-SZXqLvQm.js";import"./select-u0okJC03.js";const P=({newsletters:t,translate:m})=>{const{dashboard:a,button:s}=m;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative flex items-center justify-between gap-4 pb-6",children:[e.jsx(h,{data:t,title:a.newsletter_list,globalSearch:!0,tablePageSizes:[10,15,20,25],routeName:"newsletters.index",className:"w-full !p-0 md:p-0"}),e.jsx(i,{title:s.add_newsletter,handler:e.jsxs(o,{variant:"outline",className:"absolute -top-1 right-0 md:static md:mb-1",children:[e.jsx(d,{}),e.jsx("span",{children:s.add_newsletter})]})})]}),e.jsx(g,{className:"flex flex-col divide-y p-4",children:e.jsx(j,{type:"single",collapsible:!0,className:"space-y-4",children:t.data.length>0?t.data.map((r,l)=>e.jsxs(f,{value:r.id,className:"w-full overflow-hidden rounded-lg border",children:[e.jsx(N,{className:"[&[data-state=open]]:!bg-muted px-4 py-3 text-base hover:no-underline",children:e.jsxs("div",{className:"flex w-full items-center justify-between pr-4",children:[e.jsxs("span",{children:[t.total-l,". ",r.subject]}),e.jsxs("div",{className:"flex items-center gap-2",onClick:p=>p.stopPropagation(),children:[e.jsx(x,{routePath:route("newsletters.destroy",{id:r.id}),actionComponent:e.jsx(o,{size:"icon",variant:"secondary",className:"text-destructive h-7 w-7",children:e.jsx(n,{className:"h-3 w-3"})})}),e.jsx(w,{id:r.id}),e.jsx(i,{title:s.update_newsletter,newsletter:r,handler:e.jsx(o,{size:"icon",variant:"secondary",className:"h-7 w-7",children:e.jsx(c,{className:"h-3 w-3"})})})]})]})}),e.jsx(b,{className:"space-y-2 p-4",children:e.jsx(y,{value:r.description})})]},r.id)):e.jsx("p",{className:"text-muted-foreground p-6 text-center text-sm",children:a.no_newsletters_found})})}),e.jsx(u,{className:"mt-1 p-5 sm:p-7",routeName:"newsletters.index",paginationInfo:t})]})};P.layout=t=>e.jsx(v,{children:t});export{P as default};
