1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1707],{3193:(e,l,a)=>{"use strict";a.d(l,{NewGalleryForm:()=>u});var r=a(95155),t=a(12115),s=a(52619),n=a.n(s),i=a(30926);let c=(0,i.createServerReference)("40c0f532abe2c358d3580b563cb1ce03341576b73e",i.callServer,void 0,i.findSourceMapURL,"createGalleryAsset");var d=a(32437),o=a(8336);function u(e){let{locations:l,defaultLocationId:a}=e,[s,i]=(0,t.useState)("");async function u(e){await c(e)}return(0,r.jsxs)("form",{action:u,className:"max-w-lg space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Image URL *"}),(0,r.jsx)("input",{name:"image_url",value:s,onChange:e=>i(e.target.value),required:!0,className:"w-full border rounded px-3 py-2",placeholder:"https://..."}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Or upload below."}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(d.l,{path:o._I.galleries,onUploaded:i})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Alt text *"}),(0,r.jsx)("input",{name:"alt_text",required:!0,className:"w-full border rounded px-3 py-2",placeholder:"Describe the image"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Page (e.g. home, menu)"}),(0,r.jsx)("input",{name:"page",className:"w-full border rounded px-3 py-2"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Location"}),(0,r.jsxs)("select",{name:"location_id",defaultValue:null!=a?a:"",className:"w-full border rounded px-3 py-2",children:[(0,r.jsx)("option",{value:"",children:"â"}),l.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Sort order"}),(0,r.jsx)("input",{name:"sort_order",type:"number",defaultValue:0,className:"w-full border rounded px-3 py-2"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"checkbox",name:"is_active",defaultChecked:!0,id:"active"}),(0,r.jsx)("label",{htmlFor:"active",children:"Active"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("button",{type:"submit",className:"bg-black text-white px-4 py-2 rounded",children:"Create"}),(0,r.jsx)(n(),{href:"/admin/gallery",className:"border px-4 py-2 rounded",children:"Cancel"})]})]})}},8336:(e,l,a)=>{"use strict";a.d(l,{_I:()=>r,yf:()=>t});let r={menu:"menu",milkshakes:"milkshakes",galleries:"galleries",heroSections:"hero-sections",popUps:"pop-ups",giftCards:"gift-cards",scrollAnimations:"scroll-animations",threeDElements:"3d-elements",brandLogos:"brand/logos",brandAssets:"brand/assets",general:"general"};function t(e,l){let a="hero-sections"===e?r.heroSections:r.galleries;return(null==l?void 0:l.trim())?"".concat(a,"/").concat(l.trim()):"hero-sections"===e?"".concat(a,"/global"):a}},12555:(e,l,a)=>{Promise.resolve().then(a.bind(a,3193))},30926:(e,l,a)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),!function(e,l){for(var a in l)Object.defineProperty(e,a,{enumerable:!0,get:l[a]})}(l,{callServer:function(){return r.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return t.findSourceMapURL}});let r=a(41209),t=a(85153),s=a(77197)},32437:(e,l,a)=>{"use strict";a.d(l,{l:()=>i});var r=a(95155),t=a(12115),s=a(30926);let n=(0,s.createServerReference)("40c50e97565183bbea7a317f63d6b99b64588ebc24",s.callServer,void 0,s.findSourceMapURL,"uploadMarketingImage");function i(e){let{path:l="general",onUploaded:a}=e,[s,i]=(0,t.useState)(!1),[c,d]=(0,t.useState)(null),o=(0,t.useRef)(null);async function u(){var e;d(null);let r=o.current,t=null==r||null==(e=r.files)?void 0:e[0];if(!t)return void d("Choose a file first.");let s=new FormData;s.set("file",t),s.set("path",l),i(!0);try{let e=await n(s);e.error?d(e.error):e.url&&(a(e.url),r&&(r.value=""))}finally{i(!1)}}return(0,r.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,r.jsx)("input",{ref:o,type:"file",accept:"image/*,video/*",className:"text-sm"}),(0,r.jsx)("button",{type:"button",onClick:u,disabled:s,className:"rounded bg-gray-700 px-3 py-1.5 text-sm text-white disabled:opacity-50",children:s?"Uploadingâ¦":"Upload"}),c&&(0,r.jsx)("span",{className:"text-sm text-red-600",children:c})]})}}},e=>{e.O(0,[2619,8441,4696,7358],()=>e(e.s=12555)),_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.