import{u as p,j as e,ax as m,K as u,e as n}from"./vendor-BKmmeuxg.js";import{D as x,a as j,b as h,c as o}from"./dropdown-menu-DO-po5c1.js";import{B as g}from"./button-BpNwv2aE.js";import{S as f}from"./separator-_3LZ_wAA.js";const C=()=>{const{props:a}=p(),{system:t,direction:r,langs:c,locale:i}=a,l=()=>{n.post(route("change.direction"),{direction:r==="ltr"?"rtl":"ltr"})},d=s=>{n.post(route("change.lang"),{locale:s})};return e.jsxs(x,{children:[e.jsx(j,{className:"cursor-pointer outline-none",children:e.jsx(g,{variant:"secondary",size:"icon",className:"relative h-9 w-9 rounded-full p-0",children:e.jsx(m,{className:"!h-5 !w-5"})})}),e.jsxs(h,{align:"end",className:"w-[160px]",children:[t.fields.direction==="none"&&e.jsxs(e.Fragment,{children:[e.jsx(o,{className:"cursor-pointer justify-center px-3 uppercase",onClick:l,children:r==="ltr"?"RTL":"LTR"}),e.jsx(f,{className:"my-1"})]}),c.filter(s=>s.is_active).map(s=>e.jsxs(o,{className:"cursor-pointer px-3",onClick:()=>d(s.code),children:[e.jsx("span",{children:s.name})," ",s.code===i&&e.jsx(u,{})]},s.id))]})]})};export{C as L};
