1import{r as f,j as e}from"./chunk-QUQL4437-CaSrH1X_.js";import{u as k,B as b,T as d,S as p}from"./index-B6fR1aGL.js";import{A as l}from"./Accordion-KGHLQ_CV.js";import{M as v}from"./Modal-3nwDe_KK.js";import{S as C}from"./Switch-Bw8lmgej.js";import{C as g}from"./buttons-Clg2YkuW.js";import{u as w}from"./mantine-defaults-DRjQMuLG.js";import"./index-xXiLCrlq.js";import"./context-B-Hctjjz.js";import"./blocks-B3WE1R6u.js";function q(t){const h=w("modal"),{t:o}=k("consent-tool"),[n,a]=f.useState(()=>({tools:t.state.tools?.map(s=>({...s}))||[],customTools:t.state.customTools?.map(s=>({...s}))||[]})),u=f.useCallback((s,m)=>{a(j=>{const x={tools:[...j.tools],customTools:[...j.customTools]};return[...x.tools,...x.customTools].forEach(y=>{m.includes(y.name)&&(y.accepted=s)}),x})},[]),S=f.useCallback(()=>{[...n.tools,...n.customTools].forEach(m=>{t.onConsentChange(m.accepted,[m.name])}),t.onClose()},[n,t.onConsentChange,t.onClose]);let c=[],i=[],r=[];return n.tools&&n.tools.forEach(s=>{s.category=="functional"?c.push(s):s.category=="marketing"?i.push(s):s.category=="external"&&r.push(s)}),n.customTools&&n.customTools.forEach(s=>{s.category=="functional"?c.push(s):s.category=="marketing"?i.push(s):s.category=="external"&&r.push(s)}),e.jsxs(v,{...h,opened:t.opened,onClose:t.onClose,centered:!0,lockScroll:!0,withCloseButton:!0,title:e.jsx(d,{span:!0,fw:700,fz:"lg",mb:"md",children:o("privacyBannerTitle")}),size:"lg",children:[e.jsxs(l,{variant:"separated",chevronPosition:"left",children:[e.jsxs(l.Item,{value:"essential",children:[e.jsxs(b,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},pr:"md",children:[e.jsx(l.Control,{children:o("essentialToolsTitle")}),e.jsx(C,{checked:!0,disabled:!0})]}),e.jsx(l.Panel,{children:e.jsx(d,{children:o("essentialToolsText")})})]}),c.length>0&&e.jsx(T,{category:"functional",tools:c,title:o("functionalToolsTitle"),desc:o("functionToolsText"),onConsentChange:u}),i.length>0&&e.jsx(T,{category:"marketing",tools:i,title:o("marketingToolsTitle"),desc:o("marketingToolsText"),onConsentChange:u}),r.length>0&&e.jsx(T,{category:"external",tools:r,title:o("externalToolsTitle"),desc:o("externalToolsText"),onConsentChange:u})]}),e.jsxs(p,{mt:"md",gap:"md",children:[e.jsx(g,{type:"accept-all",onClick:t.onAcceptAll}),e.jsx(g,{type:"reject-all",onClick:t.onRejectAll}),e.jsx(g,{type:"save",onClick:S})]})]})}function T(t){const{t:h}=k("consent-tool"),o=t.tools.every(n=>n.accepted);return e.jsxs(l.Item,{value:t.category,children:[e.jsxs(b,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},pr:"md",children:[e.jsx(l.Control,{children:t.title}),e.jsx(C,{checked:o,"aria-label":t.title+" "+t.desc,onChange:n=>{t.onConsentChange(n.target.checked,t.tools.map(a=>a.name))}})]}),e.jsxs(l.Panel,{children:[e.jsx(d,{mb:"sm",children:t.desc}),e.jsx(p,{gap:"sm",children:t.tools.map(n=>e.jsx(C,{styles:{body:{display:"flex",alignItems:"center",justifyContent:"space-between"}},size:"xs",checked:n.accepted,label:e.jsx(d,{children:h(n.title)}),labelPosition:"left",onChange:a=>{t.onConsentChange(a.target.checked,[n.name])}},n.name))})]})]})}export{q as Settings};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.