(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21191,e=>{"use strict";e.s(["default",()=>h],21191);var t=e.i(43476),a=e.i(71645),s=e.i(73360),i=e.i(61745),l=e.i(94245),n=e.i(18566),r=e.i(92199),c=e.i(10936),o=e.i(11152),d=e.i(40141);function u(e){return(0,d.GenIcon)({tag:"svg",attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 4 4 L 4 22 L 10 22 L 10 28 L 28 28 L 28 10 L 22 10 L 22 4 Z M 6 6 L 20 6 L 20 10.5625 L 10.5625 20 L 6 20 Z M 11 8 L 11 9 L 8 9 L 8 11 L 12.9375 11 C 12.808594 12.148438 12.457031 13.054688 11.875 13.6875 C 11.53125 13.574219 11.222656 13.433594 10.96875 13.28125 C 10.265625 12.863281 10 12.417969 10 12 L 8 12 C 8 13.191406 8.734375 14.183594 9.71875 14.84375 C 9.226563 14.949219 8.65625 15 8 15 L 8 17 C 9.773438 17 11.25 16.59375 12.375 15.84375 C 12.898438 15.933594 13.429688 16 14 16 L 14 14.125 C 14.542969 13.214844 14.832031 12.152344 14.9375 11 L 16 11 L 16 9 L 13 9 L 13 8 Z M 21.4375 12 L 26 12 L 26 26 L 12 26 L 12 21.4375 Z M 20 13.84375 L 19.0625 16.6875 L 17.0625 22.6875 L 17 22.84375 L 17 24 L 19 24 L 19 23.125 L 19.03125 23 L 20.96875 23 L 21 23.125 L 21 24 L 23 24 L 23 22.84375 L 22.9375 22.6875 L 20.9375 16.6875 Z M 20 20.125 L 20.28125 21 L 19.71875 21 Z"},child:[]}]})(e)}var x=e.i(46932),L=e.i(88653);let h=()=>{let e="ar"===(0,i.useLocale)(),d=(0,l.useTranslations)("settingsPage"),h=(0,n.useRouter)(),m=(0,n.usePathname)(),[g,p]=(0,a.useState)(!0),[f,j]=(0,a.useState)((0,i.useLocale)()),[b,y]=(0,a.useState)(!1),w=[{id:"ar",label:d("arabic"),flag:"🇸🇦"},{id:"en",label:d("english"),flag:"🇺🇸"},{id:"tr",label:d("turkish"),flag:"🇹🇷"}];return(0,t.jsxs)(x.motion.div,{initial:{opacity:0,y:25},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full h-auto p-5 border border-gray-100 bg-white shadow-sm my-10 rounded-xl",children:[(0,t.jsx)(s.default,{text:d("title"),children:(0,t.jsx)(r.FiSettings,{})}),(0,t.jsxs)("div",{className:"mt-6 rounded-xl bg-white",children:[(0,t.jsxs)("button",{onClick:()=>p(!g),className:"flex justify-between items-center w-full p-4 text-gray-700",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(u,{size:20,color:"#3469CC"}),d("changeLanguage")]}),g?(0,t.jsx)(c.IoIosArrowUp,{}):(0,t.jsx)(c.IoIosArrowDown,{})]}),(0,t.jsx)(L.AnimatePresence,{children:g&&(0,t.jsx)(x.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.3},className:"flex flex-col",children:w.map(a=>(0,t.jsxs)(x.motion.div,{whileTap:{scale:.98},onClick:()=>(e=>{j(e);let t=m.split("/");t[1]=e;let a=t.join("/");h.push(a)})(a.id),className:"flex items-center justify-between rounded-2xl p-4 my-2 cursor-pointer transition ".concat(f===a.id?"bg-blue-50":"bg-gray-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 ".concat(e?"flex-row-reverse":"flex-row"),children:[(0,t.jsx)("span",{children:a.label}),(0,t.jsx)("span",{className:"text-2xl",children:a.flag})]}),(0,t.jsx)("input",{type:"radio",checked:f===a.id,readOnly:!0,className:"w-4 h-4 accent-blue-500"})]},a.id))})})]}),(0,t.jsx)("div",{className:"mt-6 border border-gray-200 rounded-xl bg-gray-50",children:(0,t.jsxs)("div",{className:"flex justify-between items-center w-full p-4 text-gray-700",children:[(0,t.jsx)("span",{children:d("appearance")}),(0,t.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>y(!b),children:[(0,t.jsx)(o.FaSun,{className:"text-yellow-400"}),(0,t.jsx)("div",{className:"w-12 h-6 flex items-center rounded-full p-1 duration-300 ".concat(b?"bg-gray-600":"bg-blue-500"),children:(0,t.jsx)(x.motion.div,{layout:!0,transition:{type:"spring",stiffness:500,damping:30},className:"bg-white w-4 h-4 rounded-full shadow-md",style:{transform:b?"translateX(24px)":"translateX(0px)"}})}),(0,t.jsx)(o.FaMoon,{className:"text-gray-400"})]})]})})]})}}]);