@usercentrics/cmp-browser-sdk
Version:
Usercentrics CMP Browser SDK
2 lines (1 loc) • 1.82 kB
JavaScript
import{_ as e,d as o,g as a,h as s,i as r,t as n,a3 as i,aq as t,ar as l,as as d,at as u,au as c,av as g}from"./index-a467e104.js";import{C as y,B as L,F as v}from"./FirstLayerCustomization-c46926e5.js";import{B as h}from"./ButtonsCustomization-cfeb1c62.js";import{F as f,S as p}from"./SecondLayerUI-f3983f56.js";var b=function(){function b(e,o){var y,m,B,D,w;a(this,b),w=s(this,b,[e,o]),r(w,"buttons",void 0),r(w,"firstLayer",void 0),r(w,"secondLayer",void 0);var F=o.customization;return w.buttons=n(n(n({},new h(o)),new L(o)),{},{more:{backgroundColor:i(t(null==F||null===(y=F.color)||void 0===y?void 0:y.moreBtnBackground),"#0045A5"),textColor:i(t(null==F||null===(m=F.color)||void 0===m?void 0:m.moreBtnText),"#FAFAFA")},save:{backgroundColor:t(null==F||null===(B=F.color)||void 0===B?void 0:B.saveBtnBackground),textColor:t(null==F||null===(D=F.color)||void 0===D?void 0:D.saveBtnText)}}),w.firstLayer=n(n(n({},new f(o)),new v(o)),{},{closeOption:o.firstLayer.closeOption||null,hideButtonDeny:l(o.firstLayer.hideButtonDeny,!o.btnDenyIsVisible),hideToggles:!1,isCategoryTogglesEnabled:o.firstLayer.isCategoryTogglesEnabled,isLanguageSelectorEnabled:!l(o.firstLayer.hideLanguageSwitch,!o.showLanguageDropdown),showShortDescriptionOnDesktop:!0===o.firstLayer.useShortMessage,showShortDescriptionOnMobile:o.bannerMobileDescriptionIsActive,variant:i(o.firstLayer.variant,d.BANNER)}),w.secondLayer=n(n({},new p(o)),{},{dpsDisplayFormat:o.dpsDisplayFormat||u.ALL,hideButtonDeny:l(o.secondLayer.hideButtonDeny,!o.btnDenyIsVisible),hideToggles:!1,hideTogglesForServices:i(o.secondLayer.hideTogglesForServices,!1),isLanguageSelectorEnabled:!l(o.secondLayer.hideLanguageSwitch,!o.showLanguageDropdown),side:o.secondLayer.side||c.LEFT,variant:o.secondLayer.variant||g.CENTER}),w}return e(b,y),o(b)}();export{b as default};