import{i as t}from"./_virtual___federation_fn_import-DB-0B1B_.js";import{j as e}from"./jsx-runtime-u17CrQMm.js";import{a as f}from"./zod-DVFqTTZn.js";const{infrastructureSettingsSchema:m}=await t("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:h,useProjectDefinition:x,useResettableForm:b}=await t("@baseplate-dev/project-builder-lib/web"),{FormActionBar:p,SectionList:g,SectionListSection:j,SectionListSectionContent:S,SectionListSectionHeader:v,SectionListSectionTitle:w,SwitchFieldController:C}=await t("@baseplate-dev/ui-components");function y(){const{definition:r,saveDefinitionWithFeedback:a}=x(),o=r.settings.infrastructure??{redis:{enabled:!1}},s=b({resolver:f(m),defaultValues:o}),{handleSubmit:c,control:i,reset:l}=s,n=c(d=>a(u=>{u.settings.infrastructure=d}));return h({control:i,reset:l,onSubmit:n}),e.jsxs("form",{className:"relative h-full max-h-full pb-(--action-bar-height)",onSubmit:n,children:[e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsxs("div",{className:"sticky top-0 border-b bg-background py-6",children:[e.jsx("h1",{children:"Infrastructure Configuration"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Configure optional infrastructure services for your project. These services are shared across all backend applications. PostgreSQL is always enabled and requires no configuration."})]}),e.jsx(g,{children:e.jsxs(j,{children:[e.jsx(v,{children:e.jsx(w,{children:"Redis Cache"})}),e.jsx(S,{className:"flex max-w-md flex-col gap-4",children:e.jsx(C,{name:"redis.enabled",label:"Enable Redis",description:"Redis is used for caching, sessions, and queue management.",control:i})})]})})]}),e.jsx(p,{form:s})]})}export{y as component};
//# sourceMappingURL=infrastructure-Csj7ltEz.js.map
