(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2337],{90578:function(e,t,n){Promise.resolve().then(n.bind(n,58301))},71925:function(e,t,n){"use strict";n.d(t,{Oq:function(){return u},dO:function(){return o},jn:function(){return i},iz:function(){return h},Dz:function(){return r},cv:function(){return d},oc:function(){return c}});var r=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},i=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},l=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},a={top:0,right:0,bottom:0,left:0},o=function(e){var t=e.borderBox,n=e.margin,o=void 0===n?a:n,s=e.border,d=void 0===s?a:s,c=e.padding,u=void 0===c?a:c,h=r(i(t,o)),g=r(l(t,d)),b=r(l(g,u));return{marginBox:h,borderBox:r(t),paddingBox:g,contentBox:b,margin:o,border:d,padding:u}},s=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw Error("Invariant failed")}(!1),n},d=function(e,t){var n=e.borderBox,r=e.border,i=e.margin,l=e.padding;return o({borderBox:{top:n.top+t.y,left:n.left+t.x,bottom:n.bottom+t.y,right:n.right+t.x},border:r,margin:i,padding:l})},c=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),d(e,t)},u=function(e,t){return o({borderBox:e,margin:{top:s(t.marginTop),right:s(t.marginRight),bottom:s(t.marginBottom),left:s(t.marginLeft)},padding:{top:s(t.paddingTop),right:s(t.paddingRight),bottom:s(t.paddingBottom),left:s(t.paddingLeft)},border:{top:s(t.borderTopWidth),right:s(t.borderRightWidth),bottom:s(t.borderBottomWidth),left:s(t.borderLeftWidth)}})},h=function(e){return u(e.getBoundingClientRect(),window.getComputedStyle(e))}},87461:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(64090),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @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=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),a=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{color:o="currentColor",size:s=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:u="",children:h,...g}=n;return(0,r.createElement)("svg",{ref:a,...i,width:s,height:s,stroke:o,strokeWidth:c?24*Number(d)/Number(s):d,className:["lucide","lucide-".concat(l(e)),u].join(" "),...g},[...t.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(h)?h:[h]])});return n.displayName="".concat(e),n}},46578:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).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"}]])},23441:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},37805:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},81708:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},64067:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},18994:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},77731:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},70094:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},70699:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).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"}]])},92270:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).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"}]])},70655:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).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"}]])},50489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
 * @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 r=(0,n(87461).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},11713:function(e,t){"use strict";t.Z=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=Array(r),l=0;l<r;l++)i[l]=arguments[l];t=i,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r}},58301:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return F}});var r=n(3827),i=n(89966),l=n(71774),a=n(18994),o=n(64090),s=n(84717),d=n(81708),c=n(46578),u=n(70699),h=n(64067),g=n(23441),b=n(37805),x=n(70655),p=n(92270),m=n(77731),f=n(50489),y=n(70094);let v=[{value:"indigo-500",label:"Indigo",bg:"bg-indigo-500"},{value:"purple-500",label:"Purple",bg:"bg-purple-500"},{value:"blue-500",label:"Blue",bg:"bg-blue-500"},{value:"violet-500",label:"Violet",bg:"bg-violet-500"},{value:"pink-500",label:"Pink",bg:"bg-pink-500"},{value:"cyan-500",label:"Cyan",bg:"bg-cyan-500"},{value:"emerald-500",label:"Emerald",bg:"bg-emerald-500"}],w={link:{en:"Link",ar:"رابط",color:"bg-blue-500/15 text-blue-400"},dropdown:{en:"Dropdown",ar:"قائمة",color:"bg-purple-500/15 text-purple-400"},button:{en:"Button",ar:"زر",color:"bg-green-500/15 text-green-400"}},j={always:{en:"Always",ar:"دائماً",color:"bg-gray-500/15 text-gray-400"},auth:{en:"Auth Only",ar:"مسجل فقط",color:"bg-indigo-500/15 text-indigo-400"},unauth:{en:"Guest Only",ar:"زائر فقط",color:"bg-amber-500/15 text-amber-400"},admin:{en:"Admin Only",ar:"أدمن فقط",color:"bg-red-500/15 text-red-400"}};function N(e){let{initialConfig:t,onSave:n}=e,{lang:i}=(0,l.Z)(),s="ar"===i,[h,g]=(0,o.useState)(t),[b,x]=(0,o.useState)("links"),[p,m]=(0,o.useState)(!1),[f,y]=(0,o.useState)(!1),v=JSON.stringify(h)!==JSON.stringify(t),w=async()=>{m(!0),y(!1);try{await n(h),y(!0),setTimeout(()=>y(!1),2e3)}catch(e){console.error("Failed to save:",e),alert("Failed to save changes. Please try again.")}finally{m(!1)}};return(0,r.jsxs)("div",{className:"max-w-5xl mx-auto p-6 space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white mb-2",children:s?"إدارة شريط التنقل":"Navbar Settings"}),(0,r.jsx)("p",{className:"text-gray-400",children:s?"تخصيص الروابط والمظهر وقائمة الموبايل":"Customize links, appearance, and mobile menu"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded-lg border border-white/[0.06] bg-white/[0.03] text-gray-300 hover:bg-white/[0.06] hover:text-white transition-colors",children:[(0,r.jsx)(d.Z,{className:"h-4 w-4"}),s?"معاينة":"Preview"]}),(0,r.jsx)("button",{onClick:w,disabled:!v||p||f,className:"\n              flex items-center gap-2 px-6 py-2 rounded-lg font-medium transition-all\n              ".concat(f?"bg-green-600 text-white":v?"bg-gradient-to-r from-indigo-500 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-700 shadow-lg shadow-indigo-500/25":"bg-gray-700 text-gray-400 cursor-not-allowed","\n            "),children:p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{className:"h-4 w-4 animate-spin"}),s?"جاري الحفظ...":"Saving..."]}):f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{className:"h-4 w-4"}),s?"تم الحفظ!":"Saved!"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{className:"h-4 w-4"}),s?"حفظ التغييرات":"Save Changes"]})})]})]}),(0,r.jsx)("div",{className:"flex space-x-1 p-1 bg-white/[0.03] rounded-lg border border-white/[0.06] w-fit",children:[{id:"links",labelEn:"\uD83D\uDD17 Links",labelAr:"\uD83D\uDD17 الروابط"},{id:"appearance",labelEn:"\uD83C\uDFA8 Appearance",labelAr:"\uD83C\uDFA8 المظهر"},{id:"mobile",labelEn:"\uD83D\uDCF1 Mobile",labelAr:"\uD83D\uDCF1 الموبايل"}].map(e=>(0,r.jsx)("button",{onClick:()=>x(e.id),className:"\n              px-4 py-2 rounded-md text-sm font-medium transition-all\n              ".concat(b===e.id?"bg-indigo-500/15 text-indigo-400":"text-gray-400 hover:text-white hover:bg-white/[0.04]","\n            "),children:s?e.labelAr:e.labelEn},e.id))}),(0,r.jsxs)("div",{children:["links"===b&&(0,r.jsx)(k,{links:h.links,onChange:e=>g(t=>({...t,links:e}))}),"appearance"===b&&(0,r.jsx)(E,{appearance:h.appearance,ctaStyle:h.ctaStyle,onChange:(e,t)=>g(n=>({...n,appearance:e,ctaStyle:t}))}),"mobile"===b&&(0,r.jsx)(S,{mobileStyle:h.mobileStyle})]})]})}function k(e){let{links:t,onChange:n}=e,{lang:i}=(0,l.Z)(),a="ar"===i,[d,c]=(0,o.useState)(null),[u,v]=(0,o.useState)(new Set),N=e=>{n(t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t))},k=e=>{n(t.filter(t=>t.id!==e))},A=e=>{let t=new Set(u);t.has(e)?t.delete(e):t.add(e),v(t)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.Z5,{onDragEnd:e=>{if(!e.destination)return;let r=Array.from(t),[i]=r.splice(e.source.index,1);r.splice(e.destination.index,0,i),n(r.map((e,t)=>({...e,order:t})))},children:(0,r.jsx)(s.bK,{droppableId:"links",children:e=>(0,r.jsxs)("div",{...e.droppableProps,ref:e.innerRef,className:"space-y-3",children:[t.map((e,i)=>(0,r.jsx)(s._l,{draggableId:e.id,index:i,children:(i,l)=>(0,r.jsx)("div",{ref:i.innerRef,...i.draggableProps,className:"\n                        rounded-xl border transition-all\n                        ".concat(l.isDragging?"border-indigo-500/50 bg-[#12121f] shadow-2xl":"border-white/[0.06] bg-white/[0.03]","\n                      "),children:d===e.id?(0,r.jsx)(C,{link:e,onSave:r=>{n(t.map(t=>t.id===e.id?r:t)),c(null)},onCancel:()=>c(null)}):(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{...i.dragHandleProps,className:"cursor-grab active:cursor-grabbing text-gray-500 hover:text-gray-300 transition-colors",children:(0,r.jsx)(h.Z,{className:"h-5 w-5"})}),(0,r.jsxs)("div",{className:"flex-1 flex items-center gap-3",children:[(0,r.jsx)("span",{className:"font-medium text-white",children:a?e.labelAr:e.labelEn}),(0,r.jsx)("span",{className:"px-2 py-1 rounded text-xs ".concat(w[e.type].color),children:a?w[e.type].ar:w[e.type].en}),(0,r.jsx)("span",{className:"px-2 py-1 rounded text-xs ".concat(j[e.visibility].color),children:a?j[e.visibility].ar:j[e.visibility].en})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:["dropdown"===e.type&&(0,r.jsx)("button",{onClick:()=>A(e.id),className:"p-1 text-gray-400 hover:text-white transition-colors",children:u.has(e.id)?(0,r.jsx)(g.Z,{className:"h-4 w-4"}):(0,r.jsx)(b.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:()=>N(e.id),className:"p-1 transition-colors ".concat(e.enabled?"text-green-400":"text-gray-400"),children:e.enabled?(0,r.jsx)(x.Z,{className:"h-5 w-5"}):(0,r.jsx)(p.Z,{className:"h-5 w-5"})}),(0,r.jsx)("button",{onClick:()=>c(e.id),className:"p-1 text-gray-400 hover:text-white transition-colors",children:(0,r.jsx)(m.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:()=>k(e.id),className:"p-1 text-gray-400 hover:text-red-400 transition-colors",children:(0,r.jsx)(f.Z,{className:"h-4 w-4"})})]})]}),"dropdown"===e.type&&u.has(e.id)&&(0,r.jsx)(Z,{link:e,onChange:r=>n(t.map(t=>t.id===e.id?r:t))})]})})},e.id)),e.placeholder]})})}),(0,r.jsxs)("button",{onClick:()=>{let e="link-".concat(Date.now()),r={id:e,type:"link",labelEn:"New Link",labelAr:"رابط جديد",href:"/",enabled:!0,order:t.length,visibility:"always"};n([...t,r]),c(e)},className:"w-full p-4 border-2 border-dashed border-white/[0.06] rounded-xl text-gray-400 hover:border-indigo-500/50 hover:text-indigo-400 transition-colors flex items-center justify-center gap-2",children:[(0,r.jsx)(y.Z,{className:"h-5 w-5"}),a?"إضافة رابط جديد":"Add New Link"]})]})}function C(e){let{link:t,onSave:n,onCancel:i}=e,{lang:a}=(0,l.Z)(),s="ar"===a,[d,c]=(0,o.useState)(t);return(0,r.jsx)("div",{className:"p-6 border border-indigo-500/20 bg-indigo-500/5 rounded-xl",children:(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n(d)},className:"space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"التسمية (EN)":"Label (EN)"}),(0,r.jsx)("input",{type:"text",value:d.labelEn,onChange:e=>c(t=>({...t,labelEn:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",required:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"التسمية (AR)":"Label (AR)"}),(0,r.jsx)("input",{type:"text",value:d.labelAr,onChange:e=>c(t=>({...t,labelAr:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",dir:"rtl",required:!0})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"الرابط":"URL"}),(0,r.jsx)("input",{type:"text",value:d.href,onChange:e=>c(t=>({...t,href:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",required:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"النوع":"Type"}),(0,r.jsxs)("select",{value:d.type,onChange:e=>c(t=>({...t,type:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",children:[(0,r.jsx)("option",{value:"link",children:s?"رابط":"Link"}),(0,r.jsx)("option",{value:"dropdown",children:s?"قائمة":"Dropdown"}),(0,r.jsx)("option",{value:"button",children:s?"زر":"Button"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"الرؤية":"Visibility"}),(0,r.jsxs)("select",{value:d.visibility,onChange:e=>c(t=>({...t,visibility:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",children:[(0,r.jsx)("option",{value:"always",children:s?"دائماً":"Always"}),(0,r.jsx)("option",{value:"auth",children:s?"مسجل فقط":"Auth Only"}),(0,r.jsx)("option",{value:"unauth",children:s?"زائر فقط":"Guest Only"}),(0,r.jsx)("option",{value:"admin",children:s?"أدمن فقط":"Admin Only"})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:["button"===d.type&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:s?"نمط الزر":"Button Variant"}),(0,r.jsxs)("select",{value:d.variant||"ghost",onChange:e=>c(t=>({...t,variant:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",children:[(0,r.jsx)("option",{value:"ghost",children:s?"شبح":"Ghost"}),(0,r.jsx)("option",{value:"cta",children:s?"دعوة للعمل":"CTA"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:[s?"الأيقونة":"Icon"," (",s?"اختياري":"Optional",")"]}),(0,r.jsx)("input",{type:"text",value:d.icon||"",onChange:e=>c(t=>({...t,icon:e.target.value||void 0})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white focus:border-indigo-500 focus:outline-none",placeholder:"Lucide icon name"})]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,r.jsx)("button",{type:"button",onClick:i,className:"px-4 py-2 text-gray-400 hover:text-white transition-colors",children:s?"إلغاء":"Cancel"}),(0,r.jsx)("button",{type:"submit",className:"px-6 py-2 bg-gradient-to-r from-indigo-500 to-purple-600 text-white rounded-lg hover:from-indigo-600 hover:to-purple-700 transition-colors",children:s?"حفظ":"Save"})]})]})})}function Z(e){let{link:t,onChange:n}=e,{lang:i}=(0,l.Z)(),a="ar"===i,[s,d]=(0,o.useState)(null),c=e=>{n({...t,children:(t.children||[]).filter(t=>t.id!==e)})},u=(e,r)=>{n({...t,children:(t.children||[]).map(t=>t.id===e?r:t)})};return(0,r.jsxs)("div",{className:"mt-4 pl-8 space-y-3 border-l-2 border-white/[0.06]",children:[(t.children||[]).map(e=>(0,r.jsx)("div",{className:"bg-white/[0.02] rounded-lg p-3",children:s===e.id?(0,r.jsx)(A,{child:e,onSave:t=>{u(e.id,t),d(null)},onCancel:()=>d(null)}):(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-white font-medium",children:a?e.labelAr:e.labelEn}),(0,r.jsx)("span",{className:"ml-3 text-gray-400 text-sm",children:e.href})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>d(e.id),className:"p-1 text-gray-400 hover:text-white transition-colors",children:(0,r.jsx)(m.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:()=>c(e.id),className:"p-1 text-gray-400 hover:text-red-400 transition-colors",children:(0,r.jsx)(f.Z,{className:"h-4 w-4"})})]})]})},e.id)),(0,r.jsxs)("button",{onClick:()=>{let e={id:"child-".concat(Date.now()),labelEn:"New Item",labelAr:"عنصر جديد",href:"/"};n({...t,children:[...t.children||[],e]}),d(e.id)},className:"w-full p-3 border border-dashed border-white/[0.06] rounded-lg text-gray-400 hover:border-indigo-500/50 hover:text-indigo-400 transition-colors flex items-center justify-center gap-2",children:[(0,r.jsx)(y.Z,{className:"h-4 w-4"}),a?"إضافة عنصر":"Add Item"]})]})}function A(e){let{child:t,onSave:n,onCancel:i}=e,{lang:a}=(0,l.Z)(),s="ar"===a,[d,c]=(0,o.useState)(t);return(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n(d)},className:"space-y-3",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"text",value:d.labelEn,onChange:e=>c(t=>({...t,labelEn:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white text-sm focus:border-indigo-500 focus:outline-none",placeholder:s?"التسمية (EN)":"Label (EN)",required:!0})}),(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"text",value:d.labelAr,onChange:e=>c(t=>({...t,labelAr:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white text-sm focus:border-indigo-500 focus:outline-none",placeholder:s?"التسمية (AR)":"Label (AR)",dir:"rtl",required:!0})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"text",value:d.href,onChange:e=>c(t=>({...t,href:e.target.value})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white text-sm focus:border-indigo-500 focus:outline-none",placeholder:s?"الرابط":"URL",required:!0})}),(0,r.jsx)("div",{children:(0,r.jsx)("input",{type:"text",value:d.icon||"",onChange:e=>c(t=>({...t,icon:e.target.value||void 0})),className:"w-full px-3 py-2 bg-white/[0.03] border border-white/[0.06] rounded-lg text-white text-sm focus:border-indigo-500 focus:outline-none",placeholder:s?"الأيقونة (اختياري)":"Icon (Optional)"})})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:i,className:"px-3 py-1 text-gray-400 hover:text-white text-sm transition-colors",children:s?"إلغاء":"Cancel"}),(0,r.jsx)("button",{type:"submit",className:"px-4 py-1 bg-indigo-500 text-white text-sm rounded hover:bg-indigo-600 transition-colors",children:s?"حفظ":"Save"})]})]})}function E(e){let{appearance:t,ctaStyle:n,onChange:i}=e,{lang:a}=(0,l.Z)(),o="ar"===a,s=e=>{let{value:t,onChange:n,label:i}=e;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-300",children:i}),(0,r.jsx)("div",{className:"flex gap-2",children:v.map(e=>(0,r.jsx)("button",{onClick:()=>n(e.value),className:"\n              w-8 h-8 rounded-full ".concat(e.bg," transition-all\n              ").concat(t===e.value?"ring-2 ring-white ring-offset-2 ring-offset-[#0a0a0f]":"opacity-60 hover:opacity-100","\n            "),title:e.label},e.value))})]})};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"p-6 bg-white/[0.03] border border-white/[0.06] rounded-xl",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-4",children:o?"خط الوهج":"Glow Line"}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("label",{className:"flex items-center gap-3",children:[(0,r.jsx)("input",{type:"checkbox",checked:t.glowEnabled,onChange:e=>i({...t,glowEnabled:e.target.checked},n),className:"w-4 h-4 rounded border-white/[0.06] bg-white/[0.03] text-indigo-500 focus:ring-indigo-500 focus:ring-offset-0"}),(0,r.jsx)("span",{className:"text-white font-medium",children:o?"تفعيل خط الوهج":"Enable Glow Line"})]}),t.glowEnabled&&(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsx)(s,{value:t.glowColorFrom,onChange:e=>i({...t,glowColorFrom:e},n),label:o?"اللون الأول":"From Color"}),(0,r.jsx)(s,{value:t.glowColorTo,onChange:e=>i({...t,glowColorTo:e},n),label:o?"اللون الثاني":"To Color"})]})]})]}),(0,r.jsxs)("div",{className:"p-6 bg-white/[0.03] border border-white/[0.06] rounded-xl",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-4",children:o?"نمط أزرار الدعوة للعمل":"CTA Button Style"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsx)(s,{value:n.gradientFrom,onChange:e=>i(t,{...n,gradientFrom:e}),label:o?"اللون الأول":"From Color"}),(0,r.jsx)(s,{value:n.gradientTo,onChange:e=>i(t,{...n,gradientTo:e}),label:o?"اللون الثاني":"To Color"})]})]})]})}function S(e){let{mobileStyle:t}=e,{lang:n}=(0,l.Z)(),i="ar"===n;return(0,r.jsxs)("div",{className:"p-6 bg-white/[0.03] border border-white/[0.06] rounded-xl",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-4",children:i?"نمط قائمة الموبايل":"Mobile Menu Style"}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 bg-white/[0.02] border border-white/[0.06] rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,r.jsx)("span",{className:"text-white font-medium",children:i?"تراكب كامل":"Full Overlay"})]}),(0,r.jsx)(c.Z,{className:"h-5 w-5 text-green-500"})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 bg-white/[0.01] border border-white/[0.04] rounded-lg opacity-50",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full"}),(0,r.jsx)("span",{className:"text-gray-400 font-medium",children:i?"لوحة منزلقة":"Slide Panel"})]}),(0,r.jsx)("span",{className:"text-xs text-gray-500 bg-gray-700/50 px-2 py-1 rounded",children:i?"قريباً":"Coming Soon"})]})]})]})}var D=n(93258);let L=e=>fetch(e).then(e=>e.json());function F(){let{lang:e}=(0,l.Z)(),{data:t,isLoading:n,mutate:o}=(0,i.ZP)("/api/admin/settings",L),s=(null==t?void 0:t.navbar_config)?{...D.N,...t.navbar_config,links:t.navbar_config.links||D.N.links}:D.N,d=async e=>{let t=await fetch("/api/admin/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:"navbar_config",value:e})});if(!t.ok)throw Error((await t.json()).error||"Failed to save");o()};return n?(0,r.jsx)("div",{className:"flex justify-center py-12",children:(0,r.jsx)(a.Z,{className:"h-8 w-8 animate-spin text-gray-500"})}):(0,r.jsx)(N,{initialConfig:s,onSave:d})}},93258:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r={links:[{id:"home",type:"link",labelEn:"Home",labelAr:"الرئيسية",href:"/",enabled:!0,order:0,visibility:"always"},{id:"blog",type:"link",labelEn:"Blog",labelAr:"المدونة",href:"/blog",enabled:!0,order:1,visibility:"always"},{id:"pricing",type:"link",labelEn:"Pricing",labelAr:"الأسعار",href:"/pricing",enabled:!0,order:2,visibility:"always"},{id:"more",type:"dropdown",labelEn:"More",labelAr:"المزيد",href:"#",enabled:!0,order:3,visibility:"always",children:[{id:"blog",labelEn:"Blog",labelAr:"المدونة",href:"/blog",icon:"FileText"},{id:"docs",labelEn:"Docs",labelAr:"التوثيق",href:"/docs",icon:"BookOpen"},{id:"faq",labelEn:"FAQ",labelAr:"الأسئلة الشائعة",href:"/faq",icon:"HelpCircle"},{id:"contact",labelEn:"Contact",labelAr:"تواصل معنا",href:"/contact",icon:"Mail"}]},{id:"dashboard",type:"link",labelEn:"Dashboard",labelAr:"لوحة التحكم",href:"/dashboard",icon:"LayoutDashboard",enabled:!0,order:4,visibility:"auth"},{id:"admin",type:"link",labelEn:"Admin",labelAr:"الإدارة",href:"/admin",icon:"Settings",enabled:!0,order:5,visibility:"admin"},{id:"create",type:"button",labelEn:"Create Page",labelAr:"إنشاء صفحة",href:"/create",enabled:!0,order:6,visibility:"auth",variant:"cta"},{id:"signin",type:"button",labelEn:"Sign In",labelAr:"تسجيل الدخول",href:"/login",enabled:!0,order:7,visibility:"unauth",variant:"ghost"},{id:"getstarted",type:"button",labelEn:"Get Started",labelAr:"ابدأ مجاناً",href:"/register",enabled:!0,order:8,visibility:"unauth",variant:"cta"}],appearance:{glowEnabled:!0,glowColorFrom:"indigo-500",glowColorTo:"purple-500",transparent:!1},mobileStyle:"overlay",ctaStyle:{gradientFrom:"indigo-500",gradientTo:"purple-500"}}},14749:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{Z:function(){return r}})}},function(e){e.O(0,[3338,9966,6767,1774,2971,8069,1744],function(){return e(e.s=90578)}),_N_E=e.O()}]);