import{aT as p,j as e,aR as h,aS as d,d8 as l,a$ as f,aX as o}from"./react-vendor-xYZnmIII.js";import{D as j}from"./delete-modal-h3jQBOO6.js";import{S as c}from"./switch-DkOIfbnP.js";import{a as b,B as a}from"./ui-components-CQM92IK3.js";import{D as g}from"./layout-DC6VQ8xV.js";import N from"./add-language--y6BEo2f.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./app-logo-BQGZ7CFC.js";import"./route-D0xh7FtZ.js";import"./use-lang-Dg6I_Fym.js";import"./combobox-BOClc6J1.js";import"./input-error-_LAmvivg.js";const v=()=>{const{props:t}=p(),{translate:n}=t,{settings:i,common:m}=n,u=(s,r)=>{o.put(route("language.update",s.id),{is_active:r},{preserveScroll:!0})},x=s=>{o.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:m.default}),e.jsx(d,{href:route("language.edit",s.code),children:e.jsx(a,{size:"icon",variant:"secondary",className:"mr-3 h-7 w-7 rounded-full text-blue-500",children:e.jsx(l,{className:"h-4 w-4"})})}),e.jsx(c,{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(a,{onClick:()=>x(s),size:"sm",variant:"secondary",className:"rounded-full",children:"Set Default"}):null,e.jsx(d,{href:route("language.edit",s.code),children:e.jsx(a,{size:"icon",variant:"secondary",className:"h-7 w-7 rounded-full text-blue-500",children:e.jsx(l,{className:"h-4 w-4"})})}),e.jsx(j,{routePath:route("language.destroy",s.id),actionComponent:e.jsx(a,{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(c,{name:s.code,defaultChecked:s.is_active,onCheckedChange:r=>u(s,r),className:"cursor-pointer"})]})]},s.code))})]})]})};v.layout=t=>e.jsx(g,{children:t});export{v as default};
