import{n as e}from"./useStore-CusP06SD.js";import{L as t}from"./sidebar-y9WJu7Jw.js";import{t as n}from"./Page-C7KClZ28.js";import{f as r}from"./index-DinSQfHc.js";import{C as i,a,d as o,f as s,i as c,l,r as u,t as d,v as f}from"./use-settings-form-submit-D87nmJRy.js";var p=e();function m(){let e=t(),{isFieldRequired:m}=o(f),{data:h}=r(e.settings.get.queryOptions(void 0,{select:e=>u(f,s(e.config),{includeUndefined:!0})})),g=d(),_=a({defaultValues:h??l,onSubmit:g,validators:{onSubmit:f}});return(0,p.jsx)(n,{children:(0,p.jsxs)(`div`,{className:`space-y-4`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h1`,{className:`text-2xl font-bold`,children:`Search & RSS Settings`}),(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`Manage search and RSS options.`})]}),(0,p.jsx)(c,{isFieldRequired:m,children:(0,p.jsx)(`form`,{className:`form flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),e.stopPropagation(),_.handleSubmit()},noValidate:!0,children:(0,p.jsxs)(`div`,{className:`flex flex-wrap gap-6`,children:[(0,p.jsxs)(`fieldset`,{className:`form-fieldset w-full gap-6`,children:[(0,p.jsx)(_.AppField,{name:`delay`,children:e=>(0,p.jsx)(e.NumberField,{label:`Delay`})}),(0,p.jsx)(_.AppField,{name:`matchMode`,children:e=>(0,p.jsx)(e.SelectField,{label:`Match Mode`,options:i})}),(0,p.jsx)(_.AppField,{name:`rssCadence`,children:e=>(0,p.jsx)(e.DurationField,{label:`RSS Cadence`})}),(0,p.jsx)(_.AppField,{name:`searchCadence`,children:e=>(0,p.jsx)(e.DurationField,{label:`Search Cadence`})}),(0,p.jsx)(_.AppField,{name:`searchTimeout`,children:e=>(0,p.jsx)(e.DurationField,{label:`Search Timeout`})}),(0,p.jsx)(_.AppField,{name:`searchLimit`,children:e=>(0,p.jsx)(e.NumberField,{label:`Search Limit`})}),(0,p.jsx)(_.AppField,{name:`excludeOlder`,children:e=>(0,p.jsx)(e.DurationField,{label:`Exclude Older`})}),(0,p.jsx)(_.AppField,{name:`excludeRecentSearch`,children:e=>(0,p.jsx)(e.DurationField,{label:`Exclude Recent Search`})})]}),(0,p.jsx)(_.AppForm,{children:(0,p.jsx)(_.SubmitButton,{})})]})})})]})})}export{m as component};