1import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{H as h,L as x,r as l}from"./inertia-BR2NZHmC.js";import{B as u}from"./button-BaPqe99r.js";import{B as j}from"./badge-C0ucdWQx.js";import{S as g}from"./switch-sgPqMlKt.js";import{T as f,a as b,b as n,c as i,d as T,e as r}from"./table-WgYIjgM5.js";import{P as N}from"./pagy-pagination-BiQYLSIC.js";import{A as q}from"./AdminLayout-DmVXseIc.js";import{T as v}from"./trigger-type-select-BSEqRuUV.js";import{T as w}from"./trash-2-2NOoikb7.js";import"./index-DBBLGG0U.js";import"./index-CUMReeAe.js";import"./index-Dk-J8Gm3.js";import"./index-B_DrXdhm.js";import"./index-DfLK4_Ma.js";import"./chevron-left-BTEvNnSp.js";import"./createLucideIcon-Dhf5NXPA.js";import"./chevron-right-B3mr1MgY.js";import"./select-P0cXG_VQ.js";import"./index-Ciuef51E.js";import"./Combination-CJf3FBwY.js";import"./check-BYy5zEJh.js";import"./sheet-Bob9UkzB.js";import"./use-flash-Dg4SuVdV.js";import"./routes-CofP5fMs.js";import"./map-pin-CowagHIE.js";import"./building-DtexsRZt.js";import"./log-out-Dwd158Bq.js";import"./arrow-right-C1TVI88c.js";import"./mail-AX-e3nJQ.js";import"./message-square-Cp5D599b.js";import"./separator-HBgkQ2TN.js";function y({sequences:s,pagy:a}){function d(t){confirm("Delete this sequence? Enrollments will be removed too.")&&l.delete(`/admin/sequences/${t}`)}function c(t){l.patch(`/admin/sequences/${t}/toggle_active`)}return e.jsxs(e.Fragment,{children:[e.jsx(h,{title:"Sequences"}),e.jsx("div",{className:"overflow-hidden rounded-lg border",children:e.jsxs(f,{children:[e.jsx(b,{className:"bg-muted sticky top-0 z-10",children:e.jsxs(n,{children:[e.jsx(i,{children:"Name"}),e.jsx(i,{children:"Trigger"}),e.jsx(i,{children:"Brand(s)"}),e.jsx(i,{children:"Steps"}),e.jsx(i,{className:"w-[100px]",children:"Active"}),e.jsx(i,{className:"text-right w-[80px]",children:"Actions"})]})}),e.jsxs(T,{children:[s.map(t=>{var o,m;return e.jsxs(n,{children:[e.jsx(r,{className:"font-medium",children:e.jsx(x,{href:`/admin/sequences/${t.id}/edit`,className:"text-primary hover:underline",children:t.name})}),e.jsx(r,{children:e.jsx(j,{variant:"outline",children:((o=v[t.trigger_type])==null?void 0:o.label)||t.trigger_type})}),e.jsx(r,{className:"text-sm text-muted-foreground",children:t.brands&&t.brands.length?t.brands.map(p=>p.name).join(", "):"All brands"}),e.jsx(r,{children:((m=t.sequence_steps)==null?void 0:m.length)||0}),e.jsx(r,{children:e.jsx(g,{checked:t.active,onCheckedChange:()=>c(t.id)})}),e.jsx(r,{className:"text-right",children:e.jsx(u,{variant:"ghost",size:"icon",onClick:()=>d(t.id),children:e.jsx(w,{className:"h-4 w-4 text-red-500"})})})]},t.id)}),s.length===0&&e.jsx(n,{children:e.jsx(r,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"No sequences yet. Create one to start drip messaging."})})]})]})}),a&&e.jsx(N,{pagy:a})]})}y.layout=s=>e.jsx(q,{children:s,title:"Sequences",buttonLabel:"New Sequence",buttonAction:"/admin/sequences/new"});export{y as default}; 2//# sourceMappingURL=Index-CjV149TX.js.map
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.