import{a2 as x,j as e,T as s,cR as p,w as g,a5 as r,bj as f,x as h}from"./main-TIUJvpaR.js";import{a as b}from"./admin-config-DnlTcyOh.js";import{A as z}from"./settings-layout-3TYj2S4c.js";import{S as l}from"./settings-panel-BRoAOjOp.js";import{u as F}from"./use-admin-settings-BMDiXI8M.js";import{u as S}from"./useSuspenseQuery-Bu7JdXWw.js";import{F as w,a as d}from"./radio-group-YoRFshuk.js";import{F as j}from"./select-T49HzTXy.js";import{F as y}from"./switch-Bj7wwiPq.js";import{D as v,F as D}from"./formatted-date-CsxGDhkC.js";import{u as T}from"./use-current-date-time-BdzpdEnL.js";import"./settings-links-DfKKjWK1.js";import"./external-link-DvqU4uvd.js";import"./use-admin-settings-page-nav-config-_cTFr_To.js";import"./datatable-page-with-header-layout-Bbr3vl7W.js";import"./dashboard-layout-context-DA6Q35rI.js";import"./use-toggle-dashboard-left-sidebar-BuzWlDo2.js";import"./file-upload-provider-B_bRCnuD.js";import"./uploaded-file-CLeM2EFo.js";import"./pretty-bytes-bO14ePu9.js";import"./confirmation-dialog-Ds1Wl8FN.js";import"./dialog-footer-yCpPZGPO.js";import"./use-date-formatter-hhGEq_P-.js";function se(){var m,c,u;const t=S(p(["timezones","localizations"])),a=t.data.timezones,i=t.data.localizations,{data:o}=F(),n=x({defaultValues:{client:{dates:{default_timezone:((m=o.client.dates)==null?void 0:m.default_timezone)??"auto",format:((c=o.client.dates)==null?void 0:c.format)??"auto"},locale:{default:((u=o.client.locale)==null?void 0:u.default)??"auto"},i18n:{enable:o.client.i18n.enable??!1}}}});return e.jsxs(z,{title:e.jsx(s,{message:"Localization"}),form:n,docsLink:b.settings.localization,children:[e.jsx(L,{timezones:a}),e.jsx(A,{localizations:i}),e.jsx(R,{}),e.jsx(M,{})]})}function L({timezones:t}){const{trans:a}=g();return e.jsx(l,{className:"mb-24",title:e.jsx(s,{message:"Default Timezone"}),description:e.jsx(s,{message:"Which timezone should be selected by default for new users and guests."}),children:e.jsxs(j,{size:"sm",required:!0,name:"client.dates.default_timezone",label:e.jsx(s,{message:"Timezone"}),showSearchField:!0,selectionMode:"single",searchPlaceholder:a(h("Search timezones")),children:[e.jsx(r,{value:"auto",children:e.jsx(s,{message:"Based on browser settings"})},"auto"),Object.entries(t).map(([i,o])=>e.jsx(f,{label:i,children:o.map(n=>e.jsx(r,{value:n.value,children:n.text},n.value))},i))]})})}function A({localizations:t}){return e.jsx(l,{className:"mb-24",title:e.jsx(s,{message:"Default Language"}),description:e.jsx(s,{message:"Which localization should be selected by default for new users and guests."}),children:e.jsxs(j,{size:"sm",label:e.jsx(s,{message:"Language"}),name:"client.locale.default",selectionMode:"single",children:[e.jsx(r,{value:"auto",children:e.jsx(s,{message:"Based on browser settings"})},"auto"),t.map(a=>e.jsx(r,{value:a.language,capitalizeFirst:!0,children:a.name},a.language))]})})}function R(){const t=T();return e.jsx(l,{className:"mb-24",title:e.jsx(s,{message:"Date Format"}),description:e.jsx(s,{message:"Default verbosity for all dates displayed across the site. Month/day order and separators will be adjusted automatically, based on user's locale."}),children:e.jsxs(w,{required:!0,size:"sm",name:"client.dates.format",orientation:"vertical",children:[e.jsx(d,{value:"auto",children:e.jsx(s,{message:"Auto"})},"auto"),Object.entries(v).map(([a,i])=>e.jsx(d,{value:a,children:e.jsx(D,{date:t,options:i})},a))]})})}function M(){return e.jsx(l,{className:"mb-24",title:e.jsx(s,{message:"Translations"}),description:e.jsx(s,{message:"If disabled, site will always be shown in default language and user will not be able to change their locale."}),children:e.jsx(y,{name:"client.i18n.enable",children:e.jsx(s,{message:"Enable translations"})})})}export{se as Component};
