import{R as x,o as s,a as p,S as y,cs as C,j as i,ar as S}from"./app-BgLa5dit.js";import{W as w}from"./S1bUYSnw.chunk.js";import{W as d}from"./BkG7QMvw.chunk.js";import{D as W}from"./BE59vaMU.chunk.js";import{D as z}from"./JAv_fVmZ.chunk.js";import{D as R}from"./CeYzlQh9.chunk.js";import{W as P}from"./CZxuEF13.chunk.js";import{u as v}from"./kHNgJL0M.chunk.js";import{P as H}from"./CY0zrGLk.chunk.js";import"./Bkj-W53y.chunk.js";import"./KIVqng-q.chunk.js";import"./kiNvuUO3.chunk.js";import"./oUIMm7ik.chunk.js";import"./DD0tWTM_.chunk.js";import"./CPXlV0fg.chunk.js";import"./kOrk-qeI.chunk.js";import"./CetbvyBn.chunk.js";import"./w68yffRy.chunk.js";import"./-hEPHVQE.chunk.js";import"./CxY9ECTn.chunk.js";import"./bfau-xCV.chunk.js";import"./CXuN-bs8.chunk.js";import"./DUGw_22-.chunk.js";import"./Ib-esfrz.chunk.js";import"./DnrOMuWH.chunk.js";import"./D9gPss28.chunk.js";import"./4qGb1BIY.chunk.js";import"./9Z7K2s6J.chunk.js";import"./Cu2-dDll.chunk.js";import"./B3xA170I.chunk.js";import"./t8cVFCZO.chunk.js";import"./B0KtsevF.chunk.js";import"./B5-QmNlz.chunk.js";import"./CTg_3F42.chunk.js";import"./DEF_vJGe.chunk.js";import"./B3eOBVf8.chunk.js";import"./3nM7jLnE.chunk.js";import"./MEkA24R1.chunk.js";import"./DJ0pq8J_.chunk.js";import"./CG7zbly5.chunk.js";const N="_option_wpjp4_1",q={option:N};function jt(e){var h,f;const[m,T]=x.useState(),o=v(e.dashboardId),a=s(W.allowedTemplates(e.widgetTypeId)),n=p.getDashboardTargetInfo(o.data),c=p.isClassificationDashboard(n),l=s(c&&c&&y.classification(n.classificationId)),D=s(H.streamablePresentation()),I=(f=(h=a==null?void 0:a.data)==null?void 0:h.filter(t=>{var u,b,g;if(!o.hasCompleted)return!1;const r=p.getDashboardTargetType(o.data),j=z.getProduct(o.data,(u=D.data)==null?void 0:u.id,(b=l.data)==null?void 0:b.presentationId);return(g=d[t.id])==null?void 0:g.predicate({targetType:r,product:j,widgetTypeId:e.widgetTypeId,isTopLevelClassification:C.isTopLevelTopic(l.data)})}))==null?void 0:f.map((t,r)=>({id:t.id,description:t.description,name:d[t.id].displayName??t.name,icon:d[t.id].icon,order:r,fontSize:"sm",infoComponent:()=>i.jsx(P,{description:t.description})}));return i.jsxs(R,{dashboard:o.data,widgetTypeId:e.widgetTypeId,templateId:m,currentStep:"select-template",children:[i.jsx("h2",{className:"h4",children:"Select a template"}),a.hasCompleted&&o.hasCompleted?i.jsx(w,{enableHighlight:!0,iconClassName:q.option,iconSize:"large",options:I,selectedAction:m,setOption:t=>T(t)}):i.jsx("div",{className:"p-5 text-center",children:i.jsx(S,{as:"div",animation:"border",role:"status"})})]})}export{jt as DashboardWizardSelectTemplateView};
//# sourceMappingURL=BcocJNsW.chunk.js.map
