1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[504],{3016:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/marquee",function(){return s(4028)}])},5761:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(4848);s(6540);var i=s(8298),l=s(8510);let n=e=>{let{open:t,onClose:s,handleDelete:n,title:d,subtitle:o,isLoading:r}=e;return(0,a.jsxs)(i.lG,{open:t,onClose:s,className:"relative z-10",children:[(0,a.jsx)(i.Xi,{transition:!0,className:"fixed inset-0 bg-gray-500/75 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"}),(0,a.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,a.jsxs)(i.Lj,{transition:!0,className:"relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-lg sm:p-6 data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95",children:[(0,a.jsxs)("div",{className:"sm:flex sm:items-start",children:[(0,a.jsx)("div",{className:"mx-auto flex size-12 shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:size-10",children:(0,a.jsx)(l.A,{"aria-hidden":"true",className:"size-6 text-red-600"})}),(0,a.jsxs)("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[(0,a.jsx)(i.L3,{as:"h3",className:"text-base font-semibold text-gray-900",children:d}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("p",{className:"text-sm text-gray-500",children:o})})]})]}),(0,a.jsxs)("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[(0,a.jsx)("button",{type:"button",onClick:n,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto",disabled:r,children:"Delete"}),(0,a.jsx)("button",{type:"button","data-autofocus":!0,onClick:s,className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",disabled:r,children:"Cancel"})]})]})})})]})}},3:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var a=s(4848);s(6540);var i=s(8298);let l=e=>{let{children:t,open:s,onClose:l}=e;return(0,a.jsxs)(i.lG,{open:s,onClose:l,className:"relative z-10",children:[(0,a.jsx)(i.Xi,{transition:!0,className:"fixed inset-0 bg-gray-500/75 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in"}),(0,a.jsx)("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,a.jsx)(i.Lj,{transition:!0,className:"relative transform overflow-hidden rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all data-[closed]:translate-y-4 data-[closed]:opacity-0 data-[enter]:duration-300 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in sm:my-8 sm:w-full sm:max-w-sm sm:p-6 data-[closed]:sm:translate-y-0 data-[closed]:sm:scale-95",children:(0,a.jsx)("div",{children:t})})})})]})}},4028:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var a=s(4848),i=s(5761),l=s(3),n=s(7392),d=s(9341),o=s(4683),r=s(6540),c=s(206);let m=()=>{let[e,t]=(0,r.useState)([]),[s,d]=(0,r.useState)({show:!1,isEditMode:!0,data:{content:"",id:""}}),[m,u]=(0,r.useState)({show:!1,data:{id:""},title:"",subtitle:"",status:""});(0,r.useEffect)(()=>{x()},[]);let x=async()=>{try{let e=await o.A.get("/api/marquee");e&&t(e)}catch(t){var e;c.oR.warning(null!==(e=t.message)&&void 0!==e?e:"Something went wrong")}},h=()=>{d({show:!1,isEditMode:!1,data:{content:"",id:""}})},p=async()=>{try{if(u(e=>({...e,status:"loading"})),!await o.A.delete("".concat(n.tl.MARQUEE,"/").concat(m.data.id)))throw Error("Failed to delete events.");t(e=>e.filter(e=>e.id.toString()!==m.data.id)),u({show:!1,data:{id:""},title:"",subtitle:"",status:""})}catch(t){var e;c.oR.warning(null!==(e=t.message)&&void 0!==e?e:"Something went wrong"),u(e=>({...e,status:""}))}},f=async e=>{e.preventDefault();try{if(!(s.isEditMode?await o.A.put("".concat(n.tl.MARQUEE,"/").concat(s.data.id),s.data):await o.A.post(n.tl.MARQUEE,s.data)))throw Error("Failed to create events.");c.oR.success("Marquee created successfully."),t([]),await x(),h()}catch(e){var a;c.oR.warning(null!==(a=e.message)&&void 0!==a?a:"Something went wrong")}};return(0,a.jsxs)("div",{className:"mt-10 px-4 sm:px-6 lg:px-8",children:[(0,a.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,a.jsx)("div",{className:"sm:flex-auto",children:(0,a.jsx)("h1",{className:"text-base font-semibold text-gray-900",children:"Marquee"})}),(0,a.jsx)("div",{className:"mt-4 sm:ml-16 sm:mt-0 sm:flex-none",children:(0,a.jsx)("button",{type:"button",className:"block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:()=>{d({show:!0,isEditMode:!1,data:{content:"",id:""}})},children:"Add Marquee"})})]}),(0,a.jsx)("div",{className:"mt-8 flow-root",children:(0,a.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,a.jsx)("div",{className:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8",children:(0,a.jsxs)("table",{className:"min-w-full divide-y divide-gray-300",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900",children:"Content"}),(0,a.jsx)("th",{scope:"col",className:"relative py-3.5 pl-3 pr-4 sm:pr-0",children:(0,a.jsx)("span",{className:"sr-only",children:"Edit"})})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-gray-200",children:e.map((e,t)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0",children:e.content}),(0,a.jsx)("td",{className:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0"}),(0,a.jsx)("td",{className:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0",children:(0,a.jsx)("button",{className:"text-red-600 hover:text-red-900",onClick:()=>{u({show:!0,data:{id:e.id.toString()}
1,title:"Are you sure you want to delete this Maquee?",subtitle:"This action cannot be undone. Please confirm.",status:""})},children:"Delete"})})]},t))})]})})})}),(0,a.jsx)(l.A,{open:s.show,onClose:h,children:(0,a.jsx)("div",{children:(0,a.jsxs)("form",{onSubmit:f,children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("label",{className:"text-sm text-gray-500",children:"Marquee Content"}),(0,a.jsx)("input",{onChange:e=>{d(t=>({...t,data:{...t.data,[e.target.name]:e.target.value}}))},name:"content",type:"text",value:s.data.content,className:"input"})]}),(0,a.jsx)("button",{type:"submit",className:"block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:"Submit"})]})})}),(0,a.jsx)(i.A,{open:m.show,onClose:()=>{u({show:!1,data:{id:""},title:"",subtitle:"",status:""})},handleDelete:p,title:m.title,subtitle:m.subtitle,isLoading:"loading"===m.status})]})};m.getLayout=function(e){return(0,a.jsx)(d.A,{classes:"mx-auto my-8 min-h-[90vh] max-w-[1400px] px-4",checkUser:!0,isAdminRoute:!0,children:e})};let u=m}},e=>{var t=t=>e(e.s=t);e.O(0,[563,158,778,133,341,636,593,792],()=>t(3016)),_N_E=e.O()}]);
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.