import{l as g,j as a,b7 as f,aW as d,aj as v,F as E}from"./app-BgLa5dit.js";import{C as b}from"./EsGKTtoq.chunk.js";import{O as N}from"./B-fq6xxv.chunk.js";const h="shared.curationTags",u=E.encloseNamespace(h),c={[d.CLICKVIEW_CURATED]:"ClickView Curated",[d.MOVIES_AND_TV]:"Movies + TV"};function I(s){var m;const{data:C}=s.selectedCurationTags,i=g();function o(e,n){i.error(u(e,{query:c[n],name:s.heading}))}function l(e,n){i.success(u(e,{query:c[n],name:s.heading}))}function T(e){const n=()=>l("addSuccess",e.name),r=()=>o("addError",e.name);s.addCurationTag(e,n,r)}function x(e){const n=()=>l("removeSuccess",e.name),r=()=>o("removeError",e.name);s.removeCurationTag(e,n,r)}function j(e){t(e)?x(e):T(e)}function t(e){return!!v.getTagById(C,e.id)}return a.jsxs(a.Fragment,{children:[a.jsx(N,{object:{name:s.heading}}),a.jsx("p",{className:"fw-semibold mb-2",children:a.jsx(f,{namespace:h,phrase:"heading"})}),a.jsx("div",{className:"row",children:(m=s.curationTags)==null?void 0:m.map(e=>a.jsx("div",{className:"col-6",children:a.jsxs("div",{className:"d-flex",children:[a.jsx(b,{selected:t(e),onToggle:()=>j(e),disabled:e.name===d.CLICKVIEW_CURATED&&s.disableClickViewCurated}),a.jsxs("div",{className:"ps-2",children:[a.jsx("div",{className:"fw-semibold",children:c[e.name]||e.name}),a.jsx("p",{className:"text-gray",children:a.jsx("small",{children:e.description})})]})]})},e.id))})]})}export{I as C};
//# sourceMappingURL=CaNT0eQn.chunk.js.map
