module.exports=[52139,a=>{"use strict";var b=a.i(87924),c=a.i(15925),d=a.i(72131);a.s(["AdminContentForm",0,function(){let a=(0,c.useTranslations)("admin"),[e,f]=(0,d.useState)(null),[g,h]=(0,d.useState)(!1),[i,j]=(0,d.useState)(!0);async function k(a){a.preventDefault();let b=new FormData(a.currentTarget),c={};b.forEach((a,b)=>{c[b]=String(a)});let d=await fetch("/api/admin/content",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});d.ok&&(h(!0),f(await d.json()),setTimeout(()=>h(!1),2e3))}if((0,d.useEffect)(()=>{(async()=>{try{let a=await fetch("/api/admin/content");a.ok&&f(await a.json())}finally{j(!1)}})()},[]),i||!e)return(0,b.jsx)("p",{className:"text-muted",children:i?"…":"—"});let l=(a,c,d)=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"mb-1 block text-sm text-muted",children:c}),d?(0,b.jsx)("textarea",{name:String(a),defaultValue:String(e[a]??""),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,b.jsx)("input",{name:String(a),defaultValue:String(e[a]??""),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(a));return(0,b.jsxs)("form",{onSubmit:k,className:"space-y-10",children:[(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:a("aboutSection")}),(0,b.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[l("aboutEn","About EN",!0),l("aboutAr","About AR",!0),l("aboutRu","About RU",!0),l("aboutIt","About IT",!0)]})]}),(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:a("addressSection")}),(0,b.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[l("addressEn","Address EN",!0),l("addressAr","Address AR",!0),l("addressRu","Address RU",!0),l("addressIt","Address IT",!0)]}),l("mapEmbedUrl",a("mapEmbed"))]}),(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsx)("h2",{className:"font-[family-name:var(--font-display)] text-xl text-gold",children:a("socialSection")}),(0,b.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[l("socialInstagram","Instagram URL"),l("socialFacebook","Facebook URL"),l("socialTiktok","TikTok URL"),l("socialWhatsapp","WhatsApp link"),l("socialEmail","Email")]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("button",{type:"submit",className:"rounded-md bg-gold px-6 py-3 text-sm font-medium text-background hover:bg-gold-hover",children:a("save")}),g&&(0,b.jsx)("span",{className:"text-sm text-gold",children:a("saved")})]})]})}])}];

//# sourceMappingURL=src_app_%5Blocale%5D_admin_%28protected%29_content_AdminContentForm_tsx_03h93ff._.js.map