UNPKG

@usercentrics/cmp-browser-sdk

Version:
2 lines (1 loc) 1.54 kB
import{_ as e,d as t,g as o,h as s,i as a,t as n,aq as i,ar as r,aC as l,at as d,aD as c,a3 as u}from"./index-a467e104.js";import{C as f,B as y,F as g}from"./FirstLayerCustomization-c46926e5.js";import{B as v}from"./ButtonsCustomization-cfeb1c62.js";var L=function(){function L(e,t){var f,h,m,b,p;o(this,L),p=s(this,L,[e,t]),a(p,"buttons",void 0),a(p,"firstLayer",void 0),a(p,"secondLayer",void 0);var A=t.customization;return p.buttons=n(n(n({},new v(t)),new y(t)),{},{save:{backgroundColor:i(null==A||null===(f=A.color)||void 0===f?void 0:f.saveBtnBackground),textColor:i(null==A||null===(h=A.color)||void 0===h?void 0:h.saveBtnText)}}),p.firstLayer=n(n({},new g(t)),{},{hideButtonDeny:r(t.tcf2.firstLayerHideButtonDeny,!t.tcf2.buttonsDenyAllIsEnabled),hideCustomizationButton:!0===(null===(m=t.tcf2)||void 0===m?void 0:m.enforceAcceptAll),hideNonIabPurposes:t.tcf2.hideNonIabOnFirstLayer,hideToggles:t.tcf2.firstLayerHideToggles||!0===t.tcf2.enforceAcceptAll,isOverlayEnabled:l(t),showDescriptions:t.tcf2.firstLayerShowDescriptions}),p.secondLayer={dpsDisplayFormat:t.dpsDisplayFormat||d.ALL,hideButtonDeny:r(t.tcf2.secondLayerHideButtonDeny,!t.tcf2.buttonsDenyAllIsEnabled),hideLegitimateInterestToggles:t.tcf2.hideLegitimateInterestToggles,hideToggles:t.tcf2.secondLayerHideToggles||!0===t.tcf2.enforceAcceptAll,isOverlayEnabled:c(t),showToggleAllVendors:t.tcf2.vendorToggleAll,tabColor:u(i(null===(b=t.customization)||void 0===b||null===(b=b.color)||void 0===b?void 0:b.secondLayerTab),null)},p}return e(L,f),t(L)}();export{L as default};