import{$ as e,Gt as t,a as n,l as r,o as i}from"./src-DTHkTkyy-Ce1TZuRw.js";import{_ as a,i as o}from"./connect-BSkeWkEI-BYzoVZOI.js";import{t as s}from"./connect.config-Cuh0hj_Q-DrP71hlD.js";import{t as c}from"./registerServiceWorker-LI8_JXt3-D97JUIqb.js";import{n as l,r as u,t as d}from"./build-info-DpLuk6hh-CLs40nJh.js";import{useEffect as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";var g=()=>{let g=t()?.type===`debugSettings`,[_,v]=p(s.appVersion),[y,b]=p({label:c.debug?`Enabled`:`Disabled`,value:c.debug});return f(()=>{c.setDebug(y.value)},[y]),m(i,{open:g,onOpenChange:t=>{if(!t)return e()},contentProps:{className:`rounded-2xl`},children:h(`div`,{className:`w-[700px] rounded-2xl p-6`,children:[h(`div`,{className:`mb-6 flex justify-between`,children:[m(`div`,{className:`text-xl font-bold`,children:`Debug Tools`}),m(`button`,{id:`close-modal`,onClick:()=>e(),children:m(n,{name:`Xmark`,size:28})})]}),h(`div`,{className:`flex text-sm font-bold`,children:[m(n,{name:`Ring`,size:22}),h(`span`,{className:`ml-2`,children:[`App Version: `,s.appVersion]}),(()=>{let e=d();if(e===`unknown`)return null;let t=l(),n=u(e);return t?h(`a`,{className:`ml-2 font-mono text-xs font-normal text-blue-600 hover:underline`,href:t,target:`_blank`,rel:`noreferrer noopener`,title:e,children:[`(`,n,`)`]}):h(`span`,{className:`ml-2 font-mono text-xs font-normal text-gray-500`,title:e,children:[`(`,n,`)`]})})()]}),h(`div`,{className:`mt-4 flex text-sm font-bold`,children:[m(n,{name:`Hdd`,size:22}),m(`span`,{className:`ml-2`,children:`Drive Tools:`})]}),h(`div`,{className:`mt-4 flex text-sm font-bold`,children:[m(n,{name:`Gear`,size:22}),m(`span`,{className:`ml-2`,children:`Service Worker Tools:`})]}),m(`div`,{className:`mt-2 flex items-end justify-between pl-4`,children:h(`div`,{className:`w-[400px]`,children:[m(`label`,{htmlFor:`serviceWorkerDebugMode`,className:`text-xs`,children:`Service Worker Debug Mode:`}),m(o,{id:`serviceWorkerDebugMode`,onChange:e=>{b(e)},value:y,options:[{label:`Enabled`,value:!0},{label:`Disabled`,value:!1}]})]})}),h(`div`,{className:`mt-2 flex items-end justify-between pl-4`,children:[h(`div`,{className:`w-[400px]`,children:[m(`label`,{htmlFor:`appVersion`,className:`text-xs`,children:`Set invalid app version:`}),m(a,{containerClassName:`p-1 bg-white border border-gray-200 rounded-md text-sm`,inputClassName:`text-xs font-normal`,id:`appVersion`,icon:m(`div`,{className:`flex h-full items-center text-xs`,children:`Version:`}),value:_,onChange:e=>v(e.target.value)})]}),m(`div`,{className:`mb-1 flex items-center justify-center`,children:m(r,{color:_===``?`light`:`red`,size:`small`,disabled:_===``,onClick:()=>{c.sendMessage({type:`SET_APP_VERSION`,version:_}),v(``)},children:`Add Invalid App Version`})})]})]})})};export{g as DebugSettingsModal};
//# sourceMappingURL=DebugSettingsModal-CzwlEoA8-B6Bt9ezY.js.map