import{w as x,g as m,F as p}from"./chunk-UIGDSWPH-1hkfewjj.js";import{j as e}from"./jsx-runtime-agliiQSw.js";import{B as u}from"./button-BGNaL1rW.js";import{I as n}from"./misc-CJRwnByf.js";import{S as i}from"./tooltip-Dei6jwuV.js";import{u as h}from"./root-loader-CIAkTEfn.js";import"./index-BtyHvDgk.js";import"./index-D93mqesT.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"8bd8bc3153d70a1c10ccde8d38796bd67282553d"}}catch{}})();const R=x(function(){const s=h(),t=s.preferences?.player,l=s.preferences?.fontSize,o=s.preferences?.presence,d=s.preferences?.playground,c=s.preferences?.exerciseWarning,a=m().state==="submitting";return e.jsx("div",{className:"h-full w-full overflow-y-auto",children:e.jsxs("main",{className:"container mt-12 flex w-full max-w-3xl grow flex-col gap-4 pb-24",children:[e.jsx("h1",{className:"text-h1 mb-4",children:"Preferences"}),e.jsxs(p,{method:"post",className:"flex w-full max-w-sm flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-body-xl mb-2",children:"Video Player Preferences"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"minResolution",children:"Minimum Resolution:"}),e.jsxs("select",{id:"minResolution",name:"minResolution",defaultValue:t?.minResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"480",children:"480p"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"maxResolution",children:"Maximum Resolution:"}),e.jsxs("select",{id:"maxResolution",name:"maxResolution",defaultValue:t?.maxResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Font Size Preference"}),e.jsx(i,{content:"Defaults to 16px",children:e.jsx(n,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"fontSize",children:"Font Size"}),e.jsx("input",{type:"number",id:"fontSize",name:"fontSize",defaultValue:l??16,step:"1",min:"12",max:"26",className:"border-border bg-background text-foreground rounded-md border px-2 py-1"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Presence Preference"}),e.jsx(i,{content:"This controls whether your name and avatar are displayed in the pile of faces in navigation",children:e.jsx(n,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"optOutPresence",name:"optOutPresence",defaultChecked:o?.optOut}),e.jsx("label",{htmlFor:"optOutPresence",children:"Opt out of presence features"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Persist Playground"}),e.jsx(i,{content:'When enabled, clicking "Set to Playground" will save the current playground in the "saved-playgrounds" directory.',children:e.jsx(n,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"persistPlayground",name:"persistPlayground",defaultChecked:d?.persist}),e.jsx("label",{htmlFor:"persistPlayground",children:"Enable saving playground"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Exercise Directory Warning"}),e.jsx(i,{content:"When enabled, you'll see a warning banner when you have changes in the exercises directory. This helps remind you to work in the playground directory instead.",children:e.jsx(n,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"dismissExerciseWarning",name:"dismissExerciseWarning",defaultChecked:c?.dismissed}),e.jsx("label",{htmlFor:"dismissExerciseWarning",children:"Dismiss exercise directory warnings"})]})]}),e.jsx("div",{className:"h-4"}),e.jsx(u,{varient:"primary",type:"submit",name:"intent",value:"update-preferences",disabled:a,children:a?"Updating...":"Update Preferences"})]})]})})});export{R as default};
//# sourceMappingURL=preferences-BIKOl-1k.js.map
