1import{r as o,j as e}from"./index-Cf_ajVON.js";import{e as p}from"./adminFallbackData-JeO33_Cp.js";import{M as d}from"./AdminRouter-BQE3CZaX.js";import{P as h}from"./plus-BpcropP-.js";import{S as u}from"./search-CI5-KVok.js";import{D as f}from"./download-CsTpHbSx.js";import{C as j}from"./chevron-down-DvOvGc9V.js";import{S as N}from"./settings-BEH2D0zs.js";import{A as r}from"./arrow-up-down-Gg6MOiFc.js";import{S as b}from"./square-pen-BVVtgbWS.js";import{T as w}from"./trash-2-B1Y_baWX.js";import"./input-B3lgn3HG.js";import"./businessSettings-C2lRlxRl.js";import"./index-BZFWozEr.js";import"./quicky-spicy-logo-BF3ck9UZ.js";import"./chevron-right-Bcul0bS7.js";import"./chevron-left-DBuShpHf.js";import"./x-BzwCsDoT.js";import"./lock-cIMRe1wm.js";import"./indian-rupee-Jn7bSe7x.js";import"./phone-DYx2euUu.js";import"./zap-TlV55XhQ.js";import"./camera-DxcqLYyr.js";import"./palette-BsH9BSsy.js";import"./globe-BzQyWYtV.js";import"./user-hoYoq1t7.js";import"./credit-card-DHUGIfMv.js";import"./package-DB_WzaDM.js";import"./truck-QhgJc4-J.js";import"./award-Cc_Xky1i.js";import"./wallet-Fp8jgvR5.js";import"./users-wNXMY8Mj.js";import"./mail-BWqemxpl.js";import"./message-square-SH8cX_Q0.js";import"./bell-DTCvULxx.js";import"./image-Dzxjy9hO.js";import"./dollar-sign-CLhyJeEM.js";import"./gift-CAkmCbUl.js";import"./utensils-cjWp27Tl.js";import"./map-pin-7Ib88_8s.js";import"./circle-check-CLROJLC6.js";import"./triangle-alert-C7WF895C.js";import"./receipt-C2wAAdhr.js";import"./clock-BLUAwf4T.js";import"./calendar-C53yYcCc.js";import"./file-text-CrVJUl_B.js";import"./building-2-RhnM0eh6.js";import"./utensils-crossed-CcT55kZ-.js";import"./dialog-CrMXwKWe.js";import"./index-BH0fEq1S.js";import"./index-DvNrSChk.js";import"./index-BLHo7-Gi.js";import"./index-Bkla0msJ.js";import"./tslib.es6-CwyXKlH1.js";import"./index-BgkASZz5.js";import"./dropdown-menu-CfzAFvQ-.js";import"./index-B0pSFrGe.js";import"./index-BQYWS7oj.js";import"./index-J_fU13zv.js";import"./popover-CwDVYK09.js";import"./menu-CbfEg-VQ.js";import"./log-out-CnE_25s1.js";import"./circle-alert-Dghg6EjM.js";import"./arrow-right-B6tK4L40.js";import"./AuthRedirect-BEzTws_f.js";function Pe(){const[l,m]=o.useState(""),[a,n]=o.useState(p),i=o.useMemo(()=>{if(!l.trim())return a;const t=l.toLowerCase().trim();return a.filter(s=>s.title.toLowerCase().includes(t))},[a,l]),c=t=>{n(a.map(s=>s.sl===t?{...s,status:!s.status}:s))},x=t=>{window.confirm("Are you sure you want to delete this campaign?")&&n(a.filter(s=>s.sl!==t))};return e.jsxs("div",{className:"p-4 lg:p-6 bg-slate-50 min-h-screen",children:[e.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-slate-200 p-6 mb-6",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-600 flex items-center justify-center",children:e.jsx(d,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Food Campaign"}),e.jsx("span",{className:"px-3 py-1 rounded-full text-sm font-semibold bg-slate-100 text-slate-700",children:i.length})]})]}),e.jsxs("button",{className:"px-4 py-2.5 text-sm font-medium rounded-lg bg-blue-600 text-white hover:bg-blue-700 flex items-center gap-2 transition-all shadow-md",children:[e.jsx(h,{className:"w-4 h-4"}),"Add New Campaign"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 sm:flex-initial min-w-[200px]",children:[e.jsx("input",{type:"text",placeholder:"Ex : title",value:l,onChange:t=>m(t.target.value),className:"pl-10 pr-4 py-2.5 w-full text-sm rounded-lg border border-slate-300 bg-white focus:outline-none focus:ring-2 focus:ring-slate-400 focus:border-slate-400"}),e.jsx(u,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"})]}),e.jsxs("button",{className:"px-4 py-2.5 text-sm font-medium rounded-lg border border-slate-300 bg-white hover:bg-slate-50 text-slate-700 flex items-center gap-2 transition-all",children:[e.jsx(f,{className:"w-4 h-4"}),e.jsx("span",{children:"Export"}),e.jsx(j,{className:"w-3 h-3"})]}),e.jsx("button",{className:"p-2.5 rounded-lg border border-slate-300 bg-white hover:bg-slate-50 text-slate-700 transition-all",children:e.jsx(N,{className:"w-5 h-5"})})]})]}),e.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-slate-200 overflow-hidden",children:e.jsx("div",{className:"overflow-x-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"SI"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Title"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Date"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Time"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Price"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-left text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:"Status"}),e.jsx(r,{className:"w-3 h-3 text-slate-400 cursor-pointer hover:text-slate-600"})]})}),e.jsx("th",{className:"px-6 py-4 text-center text-[10px] font-bold text-slate-700 uppercase tracking-wider",children:"Action"})]})}),e.jsx("tbody",{className:"bg-white divide-y divide-slate-100",children:i.length===0?e.jsx("tr",{children:e.jsxs("td",{colSpan:7,className:"px-6 py-20 text-center",children:[e.jsx("p",{className:"text-lg font-semibold text-slate-700 mb-1",children:"No Data Found"}),e.jsx("p",{className:"text-sm text-slate-500",children:"No campaigns match your search"})]})}):i.map(t=>e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:"text-sm font-medium text-slate-700",children:t.sl})}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("a",{href:"#",className:"text-sm font-medium text-blue-600 hover:text-blue-700",children:t.title})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("span",{className:"text-sm text-slate-700",children:[t.dateStart," - ",t.dateEnd]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("span",{className:"text-sm text-slate-700",children:[t.timeStart," - ",t.timeEnd]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("span",{className:"text-sm font-medium text-slate-900",children:["$ ",t.price.toFixed(2)]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("button",{onClick:()=>c(t.sl),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${t.status?"bg-blue-600":"bg-slate-300"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${t.status?"translate-x-6":"translate-x-1"}`})})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-center",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("button",{className:"p-1.5 rounded text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:e.jsx(b,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>x(t.sl),className:"p-1.5 rounded text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:e.jsx(w,{className:"w-4 h-4"})})]})})]},t.sl))})]})})})]})}export{Pe 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.