import{u as x,j as e,H as h,L as o,c1 as d,T as f,e as l}from"./vendor-BKmmeuxg.js";import{D as j}from"./delete-modal-D1GJlb1P.js";import{S as m}from"./switch-Db09nqXX.js";import{B as r}from"./button-BpNwv2aE.js";import{C as b}from"./card-D9_SJYq6.js";import{D as g}from"./layout-DkwBWm5d.js";import N from"./add-language-DIGmyZqF.js";import"./dialog-B2gN9MvT.js";import"./utils-DxSsnXxD.js";import"./switch-DFFqeub-.js";import"./index-WW_1X1qx.js";import"./sidebar-BYcYxQeZ.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./dropdown-menu-DO-po5c1.js";import"./app-BytVvUs_.js";/* empty css            */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./scroll-area-C8HGru-R.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./route-B4ZMN77y.js";import"./avatar-j28afJTV.js";import"./use-lang-YfV87_zl.js";import"./combobox-Byd5-E0j.js";import"./input-error-LaPr_4wd.js";import"./label-HmIcv5Yx.js";const v=()=>{const{props:t}=x(),{translate:c}=t,{settings:i,common:n}=c,u=(s,a)=>{l.put(route("language.update",s.id),{is_active:a},{preserveScroll:!0})},p=s=>{l.post(route("language.default",s.id),{preserveScroll:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(h,{title:i.language_settings}),e.jsxs(b,{className:"mx-auto w-full max-w-[1000px] space-y-6 p-6",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-b-gray-200 pb-6",children:[e.jsx("p",{className:"text-lg font-bold text-gray-900",children:i.language_settings}),e.jsx(N,{})]}),e.jsxs("div",{className:"rounded-md bg-blue-50 p-4 text-sm text-blue-700",children:[e.jsx("div",{className:"mb-2 font-medium",children:"Translation Scope Information"}),e.jsxs("ul",{className:"list-disc space-y-1 pl-5",children:[e.jsx("li",{children:"Translations will be applied to dashboard interfaces (admin, instructor, student)."}),e.jsx("li",{children:"Public pages are not affected by these translations as they are fully customizable through the page editor."})]})]}),e.jsx("div",{className:"flex flex-col gap-5",children:t.langs.map(s=>s.is_default?e.jsxs("div",{className:"mb-5 flex items-center justify-between rounded-md border border-gray-300 p-5",children:[e.jsxs("h6",{className:"text-xl",children:[s.name," (",s.nativeName,")"]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-4 rounded-full bg-blue-50 px-2 py-0.5 text-sm font-medium",children:n.default}),e.jsx(o,{href:route("language.edit",s.code),children:e.jsx(r,{size:"icon",variant:"secondary",className:"mr-3 h-7 w-7 rounded-full text-blue-500",children:e.jsx(d,{className:"h-4 w-4"})})}),e.jsx(m,{disabled:!0,checked:!0,name:s.code})]})]},s.code):e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-gray-300 p-5",children:[e.jsxs("h6",{className:"text-xl",children:[s.name," (",s.nativeName,")"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[s.is_active?e.jsx(r,{onClick:()=>p(s),size:"sm",variant:"secondary",className:"rounded-full",children:"Set Default"}):null,e.jsx(o,{href:route("language.edit",s.code),children:e.jsx(r,{size:"icon",variant:"secondary",className:"h-7 w-7 rounded-full text-blue-500",children:e.jsx(d,{className:"h-4 w-4"})})}),e.jsx(j,{routePath:route("language.destroy",s.id),actionComponent:e.jsx(r,{size:"icon",variant:"ghost",className:"bg-destructive/8 hover:bg-destructive/6 h-8 w-8 rounded-full p-0",children:e.jsx(f,{className:"text-destructive text-sm"})})}),e.jsx(m,{name:s.code,defaultChecked:s.is_active,onCheckedChange:a=>u(s,a),className:"cursor-pointer"})]})]},s.code))})]})]})};v.layout=t=>e.jsx(g,{children:t});export{v as default};
