import{aw as m,a as c,j as e,az as u,ax as n,cq as p,cr as x,bE as h,a9 as i,aA as o}from"./app-BgLa5dit.js";function b(a){const t=m(),l=c.isSystemGeneratedDashboard(a.dashboardWidgets);function r(){t.setFieldValue("applyTemplate",!t.values.applyTemplate)}return e.jsxs(u,{children:[e.jsx(n,{label:"Internal dashboard name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter an internal name for this dashboard",autoFocus:!0}),e.jsx(n,{label:"Internal description",type:"text",name:"description",id:"description",value:l?p:t.values.description,disabled:l,placeholder:"Enter an internal description"}),a.showRegionField&&a.contentRegions&&e.jsx(n,{label:"Content Region",name:"contentRegion",id:"contentRegion",showRequiredStar:!0,children:()=>e.jsx("div",{className:"w-50",children:e.jsx(x,{type:"radio",id:"content-regions",options:a.contentRegions,selected:a.contentRegions.find(s=>{var d;return s.systemName===((d=t.values.contentRegion)==null?void 0:d.toString())})||null,onUpdate:s=>{t.setFieldValue("contentRegion",s==null?void 0:s.systemName)}})})}),a.isNew&&a.canApplyTemplate&&e.jsxs("div",{className:"pb-3",children:[e.jsx(h,{on:t.values.applyTemplate,onClick:r}),e.jsx("span",{className:"ms-2 fw-semibold",onClick:r,children:"Auto-generate from template"})]}),e.jsxs(i,{children:[e.jsx(i.Cancel,{onClick:a.closePopup}),e.jsx(i.Submit,{variant:"dark",text:a.isNew?"Create":"Save"})]})]})}const j=o.object().shape({name:o.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:o.string().trim().max(255,"Description is too long")});export{j as D,b as E};
//# sourceMappingURL=LqVj63BJ.chunk.js.map
