(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93591,e=>{"use strict";var s=e.i(43476),t=e.i(48148),a=e.i(71645);e.s(["AdminContentForm",0,function(){let e=(0,t.useTranslations)("admin"),[o,d]=(0,a.useState)(null),[n,r]=(0,a.useState)(!1),[i,l]=(0,a.useState)(!0);async function c(e){e.preventDefault();let s=new FormData(e.currentTarget),t={};s.forEach((e,s)=>{t[s]=String(e)});let a=await fetch("/api/admin/content",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});a.ok&&(r(!0),d(await a.json()),setTimeout(()=>r(!1),2e3))}if((0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/admin/content");e.ok&&d(await e.json())}finally{l(!1)}})()},[]),i||!o)return(0,s.jsx)("p",{className:"text-muted",children:i?"…":"—"});let m=(e,t,a)=>(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"mb-1 block text-sm text-muted",children:t}),a?(0,s.jsx)("textarea",{name:String(e),defaultValue:String(o[e]??""),rows:4,className:"w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-gold focus:outline-none focus:ring-1 focus:ring-gold"}):(0,s.jsx)("input",{name:String(e),defaultValue:String(o[e]??""),className:"w-full rounded-md border border-border bg-card px-3 py-2 text-sm text-foreground focus:border-gold focus:outline-none focus:ring-1 focus:ring-gold"})]},String(e));return(0,s.jsxs)("form",{onSubmit:c,className:"space-y-10",children:[(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:e("aboutSection")}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[m("aboutEn","About EN",!0),m("aboutAr","About AR",!0),m("aboutRu","About RU",!0),m("aboutIt","About IT",!0)]})]}),(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:e("addressSection")}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[m("addressEn","Address EN",!0),m("addressAr","Address AR",!0),m("addressRu","Address RU",!0),m("addressIt","Address IT",!0)]}),m("mapEmbedUrl",e("mapEmbed"))]}),(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:e("socialSection")}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[m("socialInstagram","Instagram URL"),m("socialFacebook","Facebook URL"),m("socialTiktok","TikTok URL"),m("socialWhatsapp","WhatsApp link"),m("socialEmail","Email")]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("button",{type:"submit",className:"rounded-md bg-gold px-6 py-3 text-sm font-medium text-background hover:bg-gold-hover",children:e("save")}),n&&(0,s.jsx)("span",{className:"text-sm text-gold",children:e("saved")})]})]})}])}]);