import{w as d,f as x,F as m}from"./chunk-UIGDSWPH-BWkP6tD5.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{B as p}from"./button-Ds94YjAg.js";import{I as n}from"./misc-BapXpylh.js";import{S as r}from"./tooltip-C2AQeNhD.js";import{u}from"./root-loader-C5P2c7MU.js";import"./index-Az39ZADK.js";import"./index-CjiomtK6.js";const R=d(function(){const s=u(),i=s.preferences?.player,a=s.preferences?.fontSize,l=s.preferences?.presence,o=s.preferences?.playground,c=s.preferences?.exerciseWarning,t=x().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(m,{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:i?.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:i?.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(r,{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:a??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(r,{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:l?.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(r,{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:o?.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(r,{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(p,{varient:"primary",type:"submit",name:"intent",value:"update-preferences",disabled:t,children:t?"Updating...":"Update Preferences"})]})]})})});export{R as default};
//# sourceMappingURL=preferences-zUgsPzPt.js.map
