(()=>{var e={};e.id=6140,e.ids=[6140],e.modules={53524:e=>{"use strict";e.exports=require("@prisma/client")},47849:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external")},72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},55403:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},94749:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},50852:e=>{"use strict";e.exports=require("async_hooks")},32081:e=>{"use strict";e.exports=require("child_process")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},76224:e=>{"use strict";e.exports=require("tty")},73837:e=>{"use strict";e.exports=require("util")},36830:(e,a,t)=>{"use strict";t.r(a),t.d(a,{GlobalError:()=>i.ZP,__next_app__:()=>m,originalPathname:()=>d,pages:()=>c,routeModule:()=>u,tree:()=>o});var l=t(50482),s=t(69108),i=t(83543),r=t(68300),n={};for(let e in r)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(n[e]=()=>r[e]);t.d(a,n);let o=["",{children:["admin",{children:["settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.bind(t,78997)),"C:\\test2\\pagecraft-ai\\src\\app\\admin\\settings\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,82050)),"C:\\test2\\pagecraft-ai\\src\\app\\admin\\layout.tsx"],loading:[()=>Promise.resolve().then(t.bind(t,98338)),"C:\\test2\\pagecraft-ai\\src\\app\\admin\\loading.tsx"]}]},{layout:[()=>Promise.resolve().then(t.bind(t,43625)),"C:\\test2\\pagecraft-ai\\src\\app\\layout.tsx"],error:[()=>Promise.resolve().then(t.bind(t,24117)),"C:\\test2\\pagecraft-ai\\src\\app\\error.tsx"],"not-found":[()=>Promise.resolve().then(t.bind(t,48206)),"C:\\test2\\pagecraft-ai\\src\\app\\not-found.tsx"]}],c=["C:\\test2\\pagecraft-ai\\src\\app\\admin\\settings\\page.tsx"],d="/admin/settings/page",m={require:t,loadChunk:()=>Promise.resolve()},u=new l.AppPageRouteModule({definition:{kind:s.x.APP_PAGE,page:"/admin/settings/page",pathname:"/admin/settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},99784:(e,a,t)=>{Promise.resolve().then(t.bind(t,20534))},88534:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]])},63024:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},80895:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]])},33037:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]])},91700:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},67711:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},7060:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},71532:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},97751:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},85674:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},99046:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},42739:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},80508:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},38852:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},27860:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]])},70009:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]])},31498:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]])},36135:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]])},75203:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},23485:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},49970:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]])},99805:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]])},3380:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},15366:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]])},28240:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},32817:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]])},89895:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},73229:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},79200:(e,a,t)=>{"use strict";t.d(a,{Z:()=>l});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,t(69224).Z)("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]])},20534:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>eo});var l=t(95344),s=t(42739),i=t(13746),r=t(9885),n=t(66543),o=t(70009),c=t(69224);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let d=(0,c.Z)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var m=t(28240);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let u=(0,c.Z)("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var x=t(23485),g=t(71206);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let h=(0,c.Z)("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),p=(0,c.Z)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),b=[{id:"branding",icon:o.Z,en:"Branding",ar:"الهوية",color:"text-indigo-400"},{id:"ai",icon:d,en:"AI",ar:"الذكاء الاصطناعي",color:"text-purple-400"},{id:"registration",icon:m.Z,en:"Registration",ar:"التسجيل",color:"text-cyan-400"},{id:"review",icon:u,en:"Review",ar:"المراجعة",color:"text-emerald-400"},{id:"security",icon:x.Z,en:"Security",ar:"الأمان",color:"text-amber-400"},{id:"email",icon:g.Z,en:"Email",ar:"البريد",color:"text-pink-400"},{id:"footer",icon:h,en:"Footer",ar:"الفوتر",color:"text-teal-400"},{id:"system",icon:p,en:"System",ar:"النظام",color:"text-gray-400"}];function y(){let{lang:e}=(0,r.Z)(),a="ar"===e,t=e=>{document.getElementById(e)?.scrollIntoView({behavior:"smooth"})};return l.jsx("div",{className:"sticky top-0 z-10 bg-[#0a0a0f]/80 backdrop-blur-sm border-b border-white/[0.06] -mx-6 md:-mx-8 px-6 md:px-8 py-2 mb-6",children:l.jsx("div",{className:"flex gap-1 overflow-x-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:b.map(e=>(0,l.jsxs)("button",{onClick:()=>t(e.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs text-gray-400 hover:text-white hover:bg-white/[0.06] transition-colors whitespace-nowrap",children:[l.jsx(e.icon,{className:`w-3.5 h-3.5 ${e.color}`}),a?e.ar:e.en]},e.id))})})}var v=t(3729),f=t(14513),j=t(3380),w=t(7060),N=t(31498);function k({id:e,icon:a,titleEn:t,titleAr:i,children:n,onSave:o,hasChanges:c}){let{lang:d}=(0,r.Z)(),m="ar"===d,[u,x]=(0,v.useState)(!1),[g,h]=(0,v.useState)(!1),[p,b]=(0,v.useState)(""),y=async()=>{x(!0),b("");try{await o(),h(!0),setTimeout(()=>h(!1),2e3)}catch(e){b(e.message||(m?"فشل في الحفظ":"Failed to save"))}finally{x(!1)}};return(0,l.jsxs)("div",{id:e,className:"scroll-mt-20 bg-white/[0.03] border border-white/[0.06] rounded-2xl overflow-hidden",children:[l.jsx("div",{className:"px-6 pt-6 pb-2",children:(0,l.jsxs)("div",{className:"text-base font-semibold text-white flex items-center gap-2",children:[a,m?i:t]})}),l.jsx("div",{className:"px-6 pb-4 space-y-4",children:n}),p&&l.jsx("div",{className:"mx-6 mb-4 bg-red-500/10 text-red-400 px-4 py-3 rounded-lg text-sm",children:p}),l.jsx("div",{className:"px-6 pb-6 flex justify-end",children:(0,l.jsxs)("button",{onClick:y,disabled:!c||u,className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${g?"bg-green-600 text-white":c?"bg-gradient-to-r from-indigo-500 to-purple-600 text-white hover:from-indigo-400 hover:to-purple-500":"bg-white/[0.05] text-gray-600 cursor-not-allowed"}`,children:[u?l.jsx(s.Z,{className:"h-4 w-4 animate-spin"}):g?l.jsx(w.Z,{className:"h-4 w-4"}):l.jsx(N.Z,{className:"h-4 w-4"}),u?m?"جاري الحفظ...":"Saving...":g?m?"تم الحفظ!":"Saved!":m?"حفظ":"Save"]})})]})}var E=t(99805),C=t(49970);function A({labelEn:e,labelAr:a,value:t,onChange:s}){let{lang:i}=(0,r.Z)();return(0,l.jsxs)("button",{type:"button",onClick:()=>s(!t),className:"w-full flex items-center justify-between px-3 py-2 rounded-lg hover:bg-white/[0.04] transition-colors",children:[l.jsx("span",{className:"text-sm text-gray-300",children:"ar"===i?a:e}),t?l.jsx(E.Z,{className:"h-6 w-6 text-green-500"}):l.jsx(C.Z,{className:"h-6 w-6 text-gray-600"})]})}function S({labelEn:e,labelAr:a,value:t,onChange:s,placeholder:i,type:n="text"}){let{lang:o}=(0,r.Z)();return(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"ar"===o?a:e}),l.jsx("input",{type:n,value:t,onChange:e=>s(e.target.value),placeholder:i,className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors"})]})}function Z({labelEn:e,labelAr:a,value:t,onChange:s,min:i,max:n}){let{lang:o}=(0,r.Z)();return(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"ar"===o?a:e}),l.jsx("input",{type:"number",value:t,onChange:e=>s(parseInt(e.target.value)||0),min:i,max:n,className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors"})]})}function M({labelEn:e,labelAr:a,value:t,onChange:s,placeholder:i,rows:n=3}){let{lang:o}=(0,r.Z)();return(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:"ar"===o?a:e}),l.jsx("textarea",{value:t,onChange:e=>s(e.target.value),placeholder:i,rows:n,className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors resize-vertical"})]})}function P({labelEn:e,labelAr:a,value:t,onChange:s,options:i}){let{lang:n}=(0,r.Z)(),o="ar"===n;return(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:o?a:e}),l.jsx("select",{value:t,onChange:e=>s(e.target.value),className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors",children:i.map(e=>l.jsx("option",{value:e.value,children:o?e.labelAr:e.labelEn},e.value))})]})}let L=["#6366f1","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899"];function _({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),i="ar"===t,[n,c]=(0,v.useState)(e),[d,m]=(0,v.useState)(!1),[u,x]=(0,v.useState)(!1),g=(0,v.useRef)(null);(0,v.useEffect)(()=>{c(e)},[e]),(0,v.useEffect)(()=>{m(!1)},[n.logoUrl]);let h=JSON.stringify(n)!==JSON.stringify(e),p=(e,a)=>{c(t=>({...t,[e]:a}))},b=async e=>{let a=e.target.files?.[0];if(a&&a.type.startsWith("image/")&&!(a.size>2097152)){x(!0);try{let e=new FileReader;e.onload=async()=>{let t=e.result.split(",")[1],l=await fetch("/api/upload-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageBase64:t,mimeType:a.type,prefix:"logo"})});if(l.ok){let{url:e}=await l.json();p("logoUrl",e)}x(!1)},e.readAsDataURL(a)}catch{x(!1)}g.current&&(g.current.value="")}};return(0,l.jsxs)(k,{id:"branding",icon:l.jsx(o.Z,{className:"h-5 w-5 text-indigo-400"}),titleEn:"Site Branding",titleAr:"هوية الموقع",onSave:()=>a(n),hasChanges:h,children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(S,{labelEn:"Site Name",labelAr:"اسم الموقع",value:n.siteName,onChange:e=>p("siteName",e)}),l.jsx(P,{labelEn:"Default Language",labelAr:"اللغة الافتراضية",value:n.defaultLanguage,onChange:e=>p("defaultLanguage",e),options:[{value:"ar",labelEn:"Arabic",labelAr:"العربية"},{value:"en",labelEn:"English",labelAr:"الإنجليزية"}]})]}),l.jsx(M,{labelEn:"Site Description",labelAr:"وصف الموقع",value:n.siteDescription,onChange:e=>p("siteDescription",e),rows:2}),(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-2",children:i?"شعار الموقع":"Site Logo"}),(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[l.jsx("div",{className:"relative h-16 w-16 rounded-xl bg-white/[0.05] border border-white/[0.08] flex items-center justify-center overflow-hidden shrink-0",children:n.logoUrl&&!d?(0,l.jsxs)(l.Fragment,{children:[l.jsx("img",{src:n.logoUrl,alt:"Logo",className:"h-full w-full object-contain p-1",onError:()=>m(!0)}),l.jsx("button",{type:"button",onClick:()=>p("logoUrl",""),className:"absolute -top-1 -right-1 bg-red-500/90 rounded-full p-0.5 opacity-0 hover:opacity-100 transition-opacity",style:{opacity:1},children:l.jsx(f.Z,{className:"h-3 w-3 text-white"})})]}):l.jsx(j.Z,{className:"h-5 w-5 text-gray-600"})}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[l.jsx("input",{ref:g,type:"file",accept:"image/png,image/jpeg,image/svg+xml,image/webp",onChange:b,className:"hidden"}),(0,l.jsxs)("button",{type:"button",onClick:()=>g.current?.click(),disabled:u,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-white/[0.05] border border-white/[0.08] text-gray-300 hover:bg-white/[0.1] hover:text-white transition-colors disabled:opacity-50",children:[u?l.jsx(s.Z,{className:"h-4 w-4 animate-spin"}):l.jsx(j.Z,{className:"h-4 w-4"}),u?i?"جاري الرفع...":"Uploading...":n.logoUrl?i?"تغيير الشعار":"Change Logo":i?"رفع شعار":"Upload Logo"]}),(0,l.jsxs)("span",{className:"text-[10px] text-gray-600",children:["PNG, JPG, SVG, WebP — ",i?"الحد الأقصى 2 ميجا":"Max 2MB"]})]})]})]}),n.logoUrl&&!d&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm text-gray-400 mb-1",children:[i?"حجم الشعار":"Logo Size"," ",(0,l.jsxs)("span",{className:"font-mono text-indigo-400",children:[n.logoSize,"px"]})]}),l.jsx("input",{type:"range",min:16,max:64,step:2,value:n.logoSize,onChange:e=>p("logoSize",parseInt(e.target.value)),className:"w-full accent-indigo-500"}),(0,l.jsxs)("div",{className:"flex justify-between mt-1",children:[l.jsx("span",{className:"text-[10px] text-gray-600",children:"16px"}),l.jsx("span",{className:"text-[10px] text-gray-600",children:"64px"})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3 mt-2 p-3 rounded-lg bg-white/[0.03] border border-white/[0.06]",children:[l.jsx("img",{src:n.logoUrl,alt:"Size preview",style:{width:n.logoSize,height:n.logoSize},className:"object-contain"}),l.jsx("span",{className:"text-xs text-gray-500",children:i?"معاينة الحجم الفعلي":"Actual size preview"})]})]}),(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-2",children:i?"اللون الرئيسي":"Accent Color"}),l.jsx("div",{className:"flex items-center gap-2 mb-3",children:L.map(e=>l.jsx("button",{type:"button",onClick:()=>p("accentColor",e),className:`w-7 h-7 rounded-full border-2 transition-transform ${n.accentColor===e?"border-white scale-110":"border-transparent hover:border-white/30"}`,style:{backgroundColor:e},"aria-label":e},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:n.accentColor,onChange:e=>p("accentColor",e.target.value),placeholder:"#6366f1",className:"w-24 bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm font-mono focus:outline-none focus:border-indigo-500/50 transition-colors"}),l.jsx("div",{className:"w-8 h-8 rounded-full border border-white/[0.08]",style:{backgroundColor:n.accentColor}})]})]})]})}var q=t(73229),R=t(79200);let T=[{value:"google/gemini-2.5-pro-preview-03-25",label:"\uD83D\uDD25 Gemini 2.5 Pro (الأقوى)"},{value:"google/gemini-2.5-flash-preview:thinking",label:"⚡ Gemini 2.5 Flash Thinking"},{value:"google/gemini-2.5-flash-preview",label:"Gemini 2.5 Flash"},{value:"google/gemini-2.0-flash-001",label:"Gemini 2.0 Flash (موصى به)"},{value:"google/gemini-2.0-flash-lite-001",label:"Gemini 2.0 Flash Lite (أسرع)"},{value:"openai/gpt-4.1",label:"GPT-4.1"},{value:"openai/gpt-4o",label:"GPT-4o"},{value:"openai/gpt-4o-mini",label:"GPT-4o Mini"},{value:"openai/o3-mini",label:"OpenAI o3-mini (تفكير)"},{value:"anthropic/claude-opus-4-5",label:"Claude Opus 4.5 (الأقوى)"},{value:"anthropic/claude-sonnet-4-5",label:"Claude Sonnet 4.5"},{value:"anthropic/claude-3.5-sonnet",label:"Claude 3.5 Sonnet"},{value:"anthropic/claude-3.5-haiku",label:"Claude 3.5 Haiku (أسرع)"},{value:"meta-llama/llama-4-maverick",label:"Llama 4 Maverick"},{value:"meta-llama/llama-4-scout",label:"Llama 4 Scout (مجاني)"},{value:"meta-llama/llama-3.3-70b-instruct",label:"Llama 3.3 70B"},{value:"mistralai/mistral-large-2411",label:"Mistral Large"},{value:"mistralai/mistral-small-3.1-24b-instruct",label:"Mistral Small 3.1"},{value:"deepseek/deepseek-chat-v3-0324",label:"DeepSeek V3"},{value:"deepseek/deepseek-r1",label:"DeepSeek R1 (تفكير)"}],U=[{value:"google/gemini-2.0-flash-001",label:"Gemini 2.0 Flash (موصى به)"},{value:"google/gemini-2.5-flash-preview",label:"Gemini 2.5 Flash"},{value:"google/gemini-2.5-pro-preview-03-25",label:"Gemini 2.5 Pro (الأدق)"},{value:"google/gemini-2.0-flash-lite-001",label:"Gemini 2.0 Flash Lite (أسرع)"},{value:"openai/gpt-4o",label:"GPT-4o Vision"},{value:"openai/gpt-4o-mini",label:"GPT-4o Mini Vision"},{value:"openai/gpt-4.1",label:"GPT-4.1 Vision"},{value:"anthropic/claude-3.5-sonnet",label:"Claude 3.5 Sonnet Vision"},{value:"anthropic/claude-opus-4-5",label:"Claude Opus 4.5 Vision (الأقوى)"},{value:"anthropic/claude-3.5-haiku",label:"Claude 3.5 Haiku Vision (أسرع)"},{value:"meta-llama/llama-4-maverick",label:"Llama 4 Maverick Vision"},{value:"meta-llama/llama-4-scout",label:"Llama 4 Scout Vision (مجاني)"},{value:"mistralai/pixtral-large-2411",label:"Pixtral Large (Mistral Vision)"},{value:"mistralai/pixtral-12b",label:"Pixtral 12B (مجاني)"}],O=[{value:"google/gemini-2.5-flash-image",label:"Gemini 2.5 Flash Image (موصى به)"},{value:"google/gemini-2.0-flash-exp:free",label:"Gemini 2.0 Flash Exp (مجاني)"},{value:"openai/gpt-image-1",label:"GPT Image 1 (DALL\xb7E جديد)"},{value:"stability-ai/stable-diffusion-3.5-large",label:"Stable Diffusion 3.5 Large"},{value:"stability-ai/stable-diffusion-3.5-medium",label:"Stable Diffusion 3.5 Medium"},{value:"black-forest-labs/flux-1.1-pro",label:"FLUX 1.1 Pro (واقعي جداً)"},{value:"black-forest-labs/flux-schnell:free",label:"FLUX Schnell (مجاني - سريع)"}];function D({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),i="ar"===t,[n,o]=(0,v.useState)(e),[c,m]=(0,v.useState)("idle");(0,v.useEffect)(()=>{o(e)},[e]);let u=JSON.stringify(n)!==JSON.stringify(e),x=(e,a)=>{o(t=>({...t,[e]:a}))},g=(0,v.useCallback)(async()=>{m("testing");try{let e=await fetch("/api/admin/settings/test-ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:n.model,apiKey:n.apiKey})});m(e.ok?"success":"fail")}catch{m("fail")}setTimeout(()=>m("idle"),3e3)},[n.model,n.apiKey]);return(0,l.jsxs)(k,{id:"ai",icon:l.jsx(d,{className:"h-5 w-5 text-purple-400"}),titleEn:"AI Configuration",titleAr:"إعدادات الذكاء الاصطناعي",onSave:()=>a(n),hasChanges:u,children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:i?"نموذج الذكاء الاصطناعي":"AI Model"}),l.jsx("select",{value:n.model,onChange:e=>x("model",e.target.value),className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors",children:T.map(e=>l.jsx("option",{value:e.value,children:e.label},e.value))})]}),l.jsx(Z,{labelEn:"Max Tokens",labelAr:"الحد الأقصى للرموز",value:n.maxTokens,onChange:e=>x("maxTokens",e),min:256,max:32e3})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm text-gray-400 mb-1",children:[i?"مفتاح API":"API Key",l.jsx("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"mr-2 ml-2 text-[10px] text-indigo-400 hover:text-indigo-300 transition-colors",children:i?"(يتطلب مفتاح OpenRouter ↗)":"(requires OpenRouter key ↗)"})]}),(0,l.jsxs)("div",{className:"flex flex-row gap-2",children:[l.jsx("input",{type:"password",value:n.apiKey,onChange:e=>x("apiKey",e.target.value),className:"flex-1 bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors"}),(0,l.jsxs)("button",{type:"button",onClick:g,disabled:"testing"===c,className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"success"===c?"bg-green-600 text-white":"fail"===c?"bg-red-600 text-white":"bg-white/[0.05] border border-white/[0.08] text-gray-300 hover:bg-white/[0.1]"}`,children:["testing"===c?l.jsx(s.Z,{className:"h-4 w-4 animate-spin"}):"success"===c?l.jsx(w.Z,{className:"h-4 w-4"}):"fail"===c?l.jsx(q.Z,{className:"h-4 w-4"}):l.jsx(R.Z,{className:"h-4 w-4"}),"success"===c?i?"نجح!":"Success!":"fail"===c?i?"فشل":"Failed":"testing"===c?i?"جاري الاختبار...":"Testing...":i?"اختبار الاتصال":"Test Connection"]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm text-gray-400 mb-1",children:[i?"الإبداع (درجة الحرارة)":"Creativity (Temperature)"," ",l.jsx("span",{className:"font-mono text-indigo-400",children:n.temperature.toFixed(1)})]}),l.jsx("input",{type:"range",min:0,max:1,step:.1,value:n.temperature,onChange:e=>x("temperature",parseFloat(e.target.value)),className:"w-full accent-indigo-500"}),(0,l.jsxs)("div",{className:"flex justify-between mt-1",children:[l.jsx("span",{className:"text-[10px] text-gray-600",children:i?"دقيق":"Precise"}),l.jsx("span",{className:"text-[10px] text-gray-600",children:i?"إبداعي":"Creative"})]})]}),(0,l.jsxs)("div",{className:"border-t border-white/[0.06] pt-4",children:[l.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-widest font-semibold mb-4",children:i?"نماذج متخصصة":"Specialized Models"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:i?"نموذج تحليل الصور":"Image Analysis Model"}),l.jsx("select",{value:n.analysisModel,onChange:e=>x("analysisModel",e.target.value),className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors",children:U.map(e=>l.jsx("option",{value:e.value,children:e.label},e.value))}),l.jsx("p",{className:"text-[10px] text-gray-600 mt-1",children:i?"يُستخدم لتحليل صورة المنتج عند الإنشاء":"Used to analyze product image during page creation"})]}),(0,l.jsxs)("div",{children:[l.jsx("label",{className:"block text-sm text-gray-400 mb-1",children:i?"نموذج توليد صور قبل/بعد":"Before/After Image Gen Model"}),l.jsx("select",{value:n.imageGenModel,onChange:e=>x("imageGenModel",e.target.value),className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors",children:O.map(e=>l.jsx("option",{value:e.value,children:e.label},e.value))}),l.jsx("p",{className:"text-[10px] text-gray-600 mt-1",children:i?"يتطلب مفتاح OpenRouter أدناه":"Requires OpenRouter API key below"})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsxs)("label",{className:"block text-sm text-gray-400 mb-1",children:[i?"مفتاح OpenRouter API":"OpenRouter API Key",l.jsx("span",{className:"text-[10px] text-gray-600 mr-2",children:i?"(لتوليد الصور)":"(for image generation)"})]}),l.jsx("input",{type:"password",value:n.openRouterApiKey,onChange:e=>x("openRouterApiKey",e.target.value),placeholder:"sk-or-v1-...",className:"w-full bg-[#12121f] border border-white/[0.08] text-white rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-indigo-500/50 transition-colors font-mono"})]})]})]})}function z({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),[s,i]=(0,v.useState)(e);(0,v.useEffect)(()=>{i(e)},[e]);let n=JSON.stringify(s)!==JSON.stringify(e),o=(e,a)=>{i(t=>({...t,[e]:a}))};return(0,l.jsxs)(k,{id:"registration",icon:l.jsx(m.Z,{className:"h-5 w-5 text-cyan-400"}),titleEn:"Registration & Users",titleAr:"التسجيل والمستخدمين",onSave:()=>a(s),hasChanges:n,children:[(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04]",children:[l.jsx(A,{labelEn:"Allow New Registrations",labelAr:"السماح بالتسجيل الجديد",value:s.allowRegistration,onChange:e=>o("allowRegistration",e)}),l.jsx(A,{labelEn:"Require Email Verification",labelAr:"طلب تأكيد البريد الإلكتروني",value:s.requireEmailVerification,onChange:e=>o("requireEmailVerification",e)})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(P,{labelEn:"Default Plan",labelAr:"الخطة الافتراضية",value:s.defaultPlan,onChange:e=>o("defaultPlan",e),options:[{value:"FREE",labelEn:"Free",labelAr:"مجاني"},{value:"PRO",labelEn:"Pro",labelAr:"برو"},{value:"BUSINESS",labelEn:"Business",labelAr:"أعمال"}]}),l.jsx(Z,{labelEn:"Default Pages Limit",labelAr:"حد الصفحات الافتراضي",value:s.defaultPagesLimit,onChange:e=>o("defaultPagesLimit",e),min:1,max:100})]})]})}function G({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),[s,i]=(0,v.useState)(e);(0,v.useEffect)(()=>{i(e)},[e]);let n=JSON.stringify(s)!==JSON.stringify(e),o=(e,a)=>{i(t=>({...t,[e]:a}))};return l.jsx(k,{id:"review",icon:l.jsx(u,{className:"h-5 w-5 text-emerald-400"}),titleEn:"Content Review",titleAr:"مراجعة المحتوى",onSave:()=>a(s),hasChanges:n,children:(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04]",children:[l.jsx(A,{labelEn:"Require Review Before Publishing",labelAr:"طلب المراجعة قبل النشر",value:s.requireReview,onChange:e=>o("requireReview",e)}),l.jsx(A,{labelEn:"Auto-Publish (No Review Needed)",labelAr:"النشر التلقائي (بدون مراجعة)",value:s.autoPublish,onChange:e=>o("autoPublish",e)}),l.jsx(A,{labelEn:"Notify Admin on Review Request",labelAr:"إشعار المشرف عند طلب مراجعة",value:s.notifyAdminOnReview,onChange:e=>o("notifyAdminOnReview",e)})]})})}/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let F=(0,c.Z)("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function I({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),s="ar"===t,[i,n]=(0,v.useState)(e);(0,v.useEffect)(()=>{n(e)},[e]);let o=JSON.stringify(i)!==JSON.stringify(e),c=(e,a)=>{n(t=>({...t,[e]:a}))};return(0,l.jsxs)(k,{id:"security",icon:l.jsx(x.Z,{className:"h-5 w-5 text-amber-400"}),titleEn:"Security",titleAr:"الأمان",onSave:()=>a(i),hasChanges:o,children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(Z,{labelEn:"Session Duration (hours)",labelAr:"مدة الجلسة (ساعات)",value:i.sessionDurationHours,onChange:e=>c("sessionDurationHours",e),min:1,max:720}),l.jsx(Z,{labelEn:"Max Login Attempts",labelAr:"الحد الأقصى لمحاولات الدخول",value:i.maxLoginAttempts,onChange:e=>c("maxLoginAttempts",e),min:0,max:20})]}),l.jsx("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04]",children:l.jsx(A,{labelEn:"Maintenance Mode",labelAr:"وضع الصيانة",value:i.maintenanceMode,onChange:e=>c("maintenanceMode",e)})}),i.maintenanceMode&&(0,l.jsxs)("div",{className:"bg-amber-500/10 border border-amber-500/20 rounded-lg p-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-amber-400 text-sm font-medium",children:[l.jsx(F,{className:"h-4 w-4"}),s?"وضع الصيانة مفعل!":"Maintenance mode is ON!"]}),l.jsx("p",{className:"text-xs text-amber-400/70 mt-1",children:s?"جميع المستخدمين (باستثناء المشرفين) سيرون رسالة الصيانة.":"All users (except admins) will see the maintenance message."})]}),l.jsx(M,{labelEn:"Maintenance Message (English)",labelAr:"رسالة الصيانة (الإنجليزية)",value:i.maintenanceMessage,onChange:e=>c("maintenanceMessage",e),rows:2}),l.jsx(M,{labelEn:"Maintenance Message (Arabic)",labelAr:"رسالة الصيانة (العربية)",value:i.maintenanceMessageAr,onChange:e=>c("maintenanceMessageAr",e),rows:2})]})}var H=t(36135);function V({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),i="ar"===t,[n,o]=(0,v.useState)(e),[c,d]=(0,v.useState)(!1),[m,u]=(0,v.useState)(null);(0,v.useEffect)(()=>{o(e)},[e]);let x=JSON.stringify(n)!==JSON.stringify(e),h=(e,a)=>{o(t=>({...t,[e]:a}))},p=(0,v.useCallback)(async()=>{d(!0),u(null);try{let e=await fetch("/api/admin/settings/test-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromEmail:n.fromEmail,smtpHost:n.smtpHost,smtpPort:n.smtpPort,smtpUser:n.smtpUser,smtpPassword:n.smtpPassword,toEmail:n.fromEmail||n.smtpUser})});u(e.ok?"success":"fail")}catch{u("fail")}finally{d(!1)}setTimeout(()=>u(null),3e3)},[n.fromEmail,n.smtpHost,n.smtpPort,n.smtpUser,n.smtpPassword]);return(0,l.jsxs)(k,{id:"email",icon:l.jsx(g.Z,{className:"h-5 w-5 text-pink-400"}),titleEn:"Email Configuration",titleAr:"إعدادات البريد الإلكتروني",onSave:()=>a(n),hasChanges:x,children:[l.jsx("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04]",children:l.jsx(A,{labelEn:"Enable Email Notifications",labelAr:"تفعيل إشعارات البريد",value:n.enabled,onChange:e=>h("enabled",e)})}),(0,l.jsxs)("div",{className:n.enabled?"":"opacity-50 pointer-events-none",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(S,{labelEn:"From Email",labelAr:"البريد المرسل",value:n.fromEmail,onChange:e=>h("fromEmail",e),type:"email"}),l.jsx(S,{labelEn:"SMTP Host",labelAr:"خادم SMTP",value:n.smtpHost,onChange:e=>h("smtpHost",e)})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-4",children:[l.jsx(Z,{labelEn:"SMTP Port",labelAr:"منفذ SMTP",value:n.smtpPort,onChange:e=>h("smtpPort",e),min:1,max:65535}),l.jsx(S,{labelEn:"SMTP User",labelAr:"مستخدم SMTP",value:n.smtpUser,onChange:e=>h("smtpUser",e)}),l.jsx(S,{labelEn:"SMTP Password",labelAr:"كلمة مرور SMTP",value:n.smtpPassword,onChange:e=>h("smtpPassword",e),type:"password"})]}),l.jsx("div",{className:"mt-4",children:(0,l.jsxs)("button",{type:"button",onClick:p,disabled:c||!n.smtpHost,className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${"success"===m?"bg-green-600 text-white":"fail"===m?"bg-red-600 text-white":"bg-white/[0.05] border border-white/[0.08] text-gray-300 hover:bg-white/[0.1]"} ${!n.smtpHost||c?"opacity-50 cursor-not-allowed":""}`,children:[c?l.jsx(s.Z,{className:"h-4 w-4 animate-spin"}):l.jsx(H.Z,{className:"h-4 w-4"}),c?i?"جاري الإرسال...":"Sending...":"success"===m?i?"تم الإرسال!":"Sent!":"fail"===m?i?"فشل الإرسال":"Failed":i?"إرسال بريد تجريبي":"Send Test Email"]})})]})]})}var B=t(91700),J=t(80508);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let X=(0,c.Z)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);var K=t(33037);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let $=(0,c.Z)("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);function W({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),s="ar"===t,[i,n]=(0,v.useState)(e);(0,v.useEffect)(()=>{n(e)},[e]);let o=JSON.stringify(i)!==JSON.stringify(e),c=(e,a)=>{n(t=>({...t,[e]:a}))},d=(e,a)=>{n(t=>({...t,socialLinks:{...t.socialLinks,[e]:a}}))};return(0,l.jsxs)(k,{id:"contact",icon:l.jsx(B.Z,{className:"h-5 w-5 text-blue-400"}),titleEn:"Contact Configuration",titleAr:"إعدادات التواصل",onSave:()=>a("contact_config",i),hasChanges:o,children:[(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(B.Z,{className:"h-4 w-4 text-gray-400"}),l.jsx("h3",{className:"text-sm font-medium text-gray-300",children:s?"معلومات الشركة":"Company Info"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(S,{labelEn:"Company Name (EN)",labelAr:"اسم الشركة (إنجليزي)",value:i.companyNameEn,onChange:e=>c("companyNameEn",e)}),l.jsx(S,{labelEn:"Company Name (AR)",labelAr:"اسم الشركة (عربي)",value:i.companyNameAr,onChange:e=>c("companyNameAr",e)})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[l.jsx(M,{labelEn:"Address (EN)",labelAr:"العنوان (إنجليزي)",value:i.addressEn,onChange:e=>c("addressEn",e),rows:2}),l.jsx(M,{labelEn:"Address (AR)",labelAr:"العنوان (عربي)",value:i.addressAr,onChange:e=>c("addressAr",e),rows:2})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[l.jsx(S,{labelEn:"Email",labelAr:"البريد الإلكتروني",value:i.email,onChange:e=>c("email",e),type:"email"}),l.jsx(S,{labelEn:"Phone",labelAr:"الهاتف",value:i.phone,onChange:e=>c("phone",e)})]})]}),(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(J.Z,{className:"h-4 w-4 text-gray-400"}),l.jsx("h3",{className:"text-sm font-medium text-gray-300",children:s?"إعدادات الخريطة":"Map Settings"})]}),l.jsx("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] mb-4",children:l.jsx(A,{labelEn:"Enable Map",labelAr:"تفعيل الخريطة",value:i.mapEnabled,onChange:e=>c("mapEnabled",e)})}),(0,l.jsxs)("div",{className:i.mapEnabled?"":"opacity-50 pointer-events-none",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[l.jsx(Z,{labelEn:"Latitude",labelAr:"خط العرض",value:i.mapLat,onChange:e=>c("mapLat",e)}),l.jsx(Z,{labelEn:"Longitude",labelAr:"خط الطول",value:i.mapLng,onChange:e=>c("mapLng",e)}),l.jsx(Z,{labelEn:"Zoom Level",labelAr:"مستوى التكبير",value:i.mapZoom,onChange:e=>c("mapZoom",e),min:1,max:20})]}),l.jsx("div",{className:"mt-4",children:l.jsx(S,{labelEn:"Map Embed URL",labelAr:"رابط تضمين الخريطة",value:i.mapEmbedUrl,onChange:e=>c("mapEmbedUrl",e)})})]})]}),(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(X,{className:"h-4 w-4 text-gray-400"}),l.jsx("h3",{className:"text-sm font-medium text-gray-300",children:s?"روابط التواصل الاجتماعي":"Social Links"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(S,{labelEn:"Twitter",labelAr:"تويتر",value:i.socialLinks.twitter,onChange:e=>d("twitter",e)}),l.jsx(S,{labelEn:"LinkedIn",labelAr:"لينكد إن",value:i.socialLinks.linkedin,onChange:e=>d("linkedin",e)}),l.jsx(S,{labelEn:"Instagram",labelAr:"إنستجرام",value:i.socialLinks.instagram,onChange:e=>d("instagram",e)}),l.jsx(S,{labelEn:"Facebook",labelAr:"فيسبوك",value:i.socialLinks.facebook,onChange:e=>d("facebook",e)}),l.jsx(S,{labelEn:"YouTube",labelAr:"يوتيوب",value:i.socialLinks.youtube,onChange:e=>d("youtube",e)}),l.jsx(S,{labelEn:"GitHub",labelAr:"جيتهاب",value:i.socialLinks.github,onChange:e=>d("github",e)})]}),l.jsx("div",{className:"mt-4",children:l.jsx(S,{labelEn:"WhatsApp",labelAr:"واتساب",value:i.socialLinks.whatsapp,onChange:e=>d("whatsapp",e)})})]}),(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(K.Z,{className:"h-4 w-4 text-gray-400"}),l.jsx("h3",{className:"text-sm font-medium text-gray-300",children:s?"الإشعارات":"Notifications"})]}),l.jsx(S,{labelEn:"Notification Email",labelAr:"بريد الإشعارات",value:i.notificationEmail,onChange:e=>c("notificationEmail",e),type:"email"})]}),(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx($,{className:"h-4 w-4 text-gray-400"}),l.jsx("h3",{className:"text-sm font-medium text-gray-300",children:s?"الرد التلقائي":"Auto-Reply"})]}),l.jsx("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] mb-4",children:l.jsx(A,{labelEn:"Enable Auto-Reply",labelAr:"تفعيل الرد التلقائي",value:i.autoReplyEnabled,onChange:e=>c("autoReplyEnabled",e)})}),l.jsx("div",{className:i.autoReplyEnabled?"":"opacity-50 pointer-events-none",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(M,{labelEn:"Auto-Reply Message (EN)",labelAr:"رسالة الرد التلقائي (إنجليزي)",value:i.autoReplyMessageEn,onChange:e=>c("autoReplyMessageEn",e),rows:3}),l.jsx(M,{labelEn:"Auto-Reply Message (AR)",labelAr:"رسالة الرد التلقائي (عربي)",value:i.autoReplyMessageAr,onChange:e=>c("autoReplyMessageAr",e),rows:3})]})})]})]})}function Y({data:e,onSave:a}){let{lang:t}=(0,r.Z)(),s="ar"===t,[i,n]=(0,v.useState)(e);(0,v.useEffect)(()=>{n(e)},[e]);let o=JSON.stringify(i)!==JSON.stringify(e),c=(e,a)=>n(t=>({...t,[e]:a}));return(0,l.jsxs)(k,{id:"footer",icon:l.jsx(h,{className:"h-5 w-5 text-teal-400"}),titleEn:"Footer",titleAr:"الفوتر",onSave:()=>a(i),hasChanges:o,children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(M,{labelEn:"Description (English)",labelAr:"الوصف (إنجليزي)",value:i.descriptionEn,onChange:e=>c("descriptionEn",e),rows:2}),l.jsx(M,{labelEn:"Description (Arabic)",labelAr:"الوصف (عربي)",value:i.descriptionAr,onChange:e=>c("descriptionAr",e),rows:2})]}),l.jsx(S,{labelEn:"Custom Copyright Text (leave empty for default)",labelAr:"نص حقوق النشر المخصص (اتركه فارغاً للافتراضي)",value:i.copyrightText,onChange:e=>c("copyrightText",e),placeholder:s?"\xa9 2025 شركتك. جميع الحقوق محفوظة.":"\xa9 2025 YourCompany. All rights reserved."}),(0,l.jsxs)("div",{children:[l.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-widest font-semibold mb-3",children:s?"روابط السوشيال ميديا":"Social Media Links"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[l.jsx(S,{labelEn:"\uD835\uDD4F (Twitter) URL",labelAr:"رابط \uD835\uDD4F (تويتر)",value:i.twitterUrl,onChange:e=>c("twitterUrl",e),placeholder:"https://x.com/yourhandle"}),l.jsx(S,{labelEn:"LinkedIn URL",labelAr:"رابط لينكدإن",value:i.linkedinUrl,onChange:e=>c("linkedinUrl",e),placeholder:"https://linkedin.com/company/..."}),l.jsx(S,{labelEn:"Instagram URL",labelAr:"رابط إنستغرام",value:i.instagramUrl,onChange:e=>c("instagramUrl",e),placeholder:"https://instagram.com/yourhandle"}),l.jsx(S,{labelEn:"WhatsApp URL",labelAr:"رابط واتساب",value:i.whatsappUrl,onChange:e=>c("whatsappUrl",e),placeholder:"https://wa.me/9665XXXXXXXX"})]})]}),(0,l.jsxs)("div",{children:[l.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-widest font-semibold mb-2",children:s?"الروابط الظاهرة":"Visible Links"}),(0,l.jsxs)("div",{className:"border border-white/[0.06] rounded-xl overflow-hidden divide-y divide-white/[0.04]",children:[l.jsx(A,{labelEn:"Pricing",labelAr:"الأسعار",value:i.showPricing,onChange:e=>c("showPricing",e)}),l.jsx(A,{labelEn:"Blog",labelAr:"المدونة",value:i.showBlog,onChange:e=>c("showBlog",e)}),l.jsx(A,{labelEn:"Contact Us",labelAr:"تواصل معنا",value:i.showContact,onChange:e=>c("showContact",e)}),l.jsx(A,{labelEn:"Documentation",labelAr:"التوثيق",value:i.showDocs,onChange:e=>c("showDocs",e)}),l.jsx(A,{labelEn:"Privacy Policy",labelAr:"سياسة الخصوصية",value:i.showPrivacy,onChange:e=>c("showPrivacy",e)}),l.jsx(A,{labelEn:"Terms of Service",labelAr:"شروط الاستخدام",value:i.showTerms,onChange:e=>c("showTerms",e)})]})]})]})}var Q=t(75203),ee=t(30304),ea=t(99046),et=t(89895),el=t(37121),es=t(15366);function ei({data:e,aiModel:a}){let{lang:t}=(0,r.Z)(),s="ar"===t,i=[{icon:l.jsx(Q.Z,{className:"h-4 w-4 text-gray-400"}),labelEn:"Version",labelAr:"الإصدار",value:e.version},{icon:l.jsx(ee.Z,{className:"h-4 w-4 text-gray-400"}),labelEn:"Environment",labelAr:"البيئة",value:e.environment},{icon:l.jsx(ea.Z,{className:"h-4 w-4 text-gray-400"}),labelEn:"Database",labelAr:"قاعدة البيانات",value:e.database},{icon:l.jsx(d,{className:"h-4 w-4 text-gray-400"}),labelEn:"AI Model",labelAr:"نموذج الذكاء",value:a}],n=[{icon:l.jsx(et.Z,{className:"h-5 w-5 text-indigo-400"}),labelEn:"Users",labelAr:"المستخدمون",value:e.totalUsers},{icon:l.jsx(el.Z,{className:"h-5 w-5 text-purple-400"}),labelEn:"Pages",labelAr:"الصفحات",value:e.totalPages},{icon:l.jsx(es.Z,{className:"h-5 w-5 text-cyan-400"}),labelEn:"Leads",labelAr:"العملاء المحتملون",value:e.totalLeads}];return(0,l.jsxs)("div",{id:"system",className:"rounded-2xl border border-white/[0.06] bg-white/[0.03] overflow-hidden scroll-mt-20",children:[l.jsx("div",{className:"px-6 pt-6 pb-2",children:(0,l.jsxs)("div",{className:"text-base font-semibold text-white flex items-center gap-2",children:[l.jsx(p,{className:"h-5 w-5 text-gray-400"}),s?"معلومات النظام":"System Information"]})}),(0,l.jsxs)("div",{className:"px-6 pb-6 space-y-4",children:[l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:i.map(e=>(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[e.icon,l.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:s?e.labelAr:e.labelEn})]}),l.jsx("div",{className:"text-sm text-white font-medium",children:e.value})]},e.labelEn))}),l.jsx("div",{className:"grid grid-cols-3 gap-3",children:n.map(e=>(0,l.jsxs)("div",{className:"bg-white/[0.02] rounded-lg border border-white/[0.04] p-3 text-center",children:[l.jsx("div",{className:"flex justify-center mb-1",children:e.icon}),l.jsx("div",{className:"text-lg font-bold text-white",children:e.value.toLocaleString()}),l.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:s?e.labelAr:e.labelEn})]},e.labelEn))})]})]})}var er=t(746);let en=e=>fetch(e).then(e=>e.json());function eo(){let{lang:e}=(0,r.Z)(),a="ar"===e,{data:t,error:o,isLoading:c,mutate:d}=(0,n.ZP)("/api/admin/settings",en),m=async(e,a)=>{let t=await fetch("/api/admin/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,value:a})});if(!t.ok)throw Error((await t.json()).error||"Failed to save");d()};if(c)return l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(s.Z,{className:"w-6 h-6 animate-spin text-gray-400"})});if(o||!t)return l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx("p",{className:"text-sm text-red-400",children:a?"فشل في تحميل الإعدادات":"Failed to load settings"})});let u={...er.w0.site_branding,...t.site_branding},x={...er.w0.ai_config,...t.ai_config},g={...er.w0.registration_config,...t.registration_config},h={...er.w0.content_review,...t.content_review},p={...er.w0.security_config,...t.security_config},b={...er.w0.email_config,...t.email_config},v={...er.w0.footer_config,...t.footer_config},f=t.system_info;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("header",{className:"mb-6",children:[(0,l.jsxs)("h1",{className:"text-2xl font-bold mb-1 text-white flex items-center gap-2",children:[l.jsx(i.Z,{className:"w-6 h-6 text-gray-400"}),a?"إعدادات النظام":"System Settings"]}),l.jsx("p",{className:"text-sm text-gray-400",children:a?"إدارة الإعدادات العامة للمنصة":"Manage global platform settings"})]}),l.jsx(y,{}),(0,l.jsxs)("div",{className:"max-w-4xl space-y-6",children:[l.jsx(_,{data:u,onSave:e=>m("site_branding",e)}),l.jsx(D,{data:x,onSave:e=>m("ai_config",e)}),l.jsx(z,{data:g,onSave:e=>m("registration_config",e)}),l.jsx(G,{data:h,onSave:e=>m("content_review",e)}),l.jsx(I,{data:p,onSave:e=>m("security_config",e)}),l.jsx(V,{data:b,onSave:e=>m("email_config",e)}),l.jsx(W,{data:t?.contact_config??er.w0.contact_config,onSave:m}),l.jsx(Y,{data:v,onSave:e=>m("footer_config",e)}),l.jsx(ei,{data:f,aiModel:x.model})]})]})}},48096:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),function(e,a){for(var t in a)Object.defineProperty(e,t,{enumerable:!0,get:a[t]})}(a,{DynamicServerError:function(){return l},isDynamicServerError:function(){return s}});let t="DYNAMIC_SERVER_USAGE";class l extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=t}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===t}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),e.exports=a.default)},72973:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),function(e,a){for(var t in a)Object.defineProperty(e,t,{enumerable:!0,get:a[t]})}(a,{isStaticGenBailoutError:function(){return n},staticGenerationBailout:function(){return c}});let l=t(48096),s=t(45869),i="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=i}}function n(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===i}function o(e,a){let{dynamic:t,link:l}=a||{};return"Page"+(t?' with `dynamic = "'+t+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(l?" See more info here: "+l:"")}let c=(e,a)=>{let{dynamic:t,link:i}=void 0===a?{}:a,n=s.staticGenerationAsyncStorage.getStore();if(!n)return!1;if(n.forceStatic)return!0;if(n.dynamicShouldError)throw new r(o(e,{link:i,dynamic:null!=t?t:"error"}));let c=o(e,{dynamic:t,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(null==n.postpone||n.postpone.call(n,e),n.revalidate=0,n.isStaticGeneration){let a=new l.DynamicServerError(c);throw n.dynamicUsageDescription=e,n.dynamicUsageStack=a.stack,a}return!1};("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),e.exports=a.default)},78997:(e,a,t)=>{"use strict";t.r(a),t.d(a,{$$typeof:()=>i,__esModule:()=>s,default:()=>r});let l=(0,t(86843).createProxy)(String.raw`C:\test2\pagecraft-ai\src\app\admin\settings\page.tsx`),{__esModule:s,$$typeof:i}=l,r=l.default}};var a=require("../../../webpack-runtime.js");a.C(e);var t=e=>a(a.s=e),l=a.X(0,[1638,5312,6632,3910,9043],()=>t(36830));module.exports=l})();