'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),ThirdPartyPreview=require("./ThirdPartyPreview.js"),React=require("react"),KlarmaMessaging=require("../configs/KlarmaMessaging.js");const mapWidgetLabel={topStripPromotionBadge:"Top strip promotion badge",topStripPromotionAutoSize:"Top strip promotion auto size",footerPromotionAutoSize:"Footer promotion auto size",infoPage:"Info page"},KlarnaMessagingContent=({setting:e})=>{let r=e?.widgetType&&mapWidgetLabel[e.widgetType],t=React.useMemo(()=>r?`${KlarmaMessaging.default.label} - ${r}`:KlarmaMessaging.default.label,[r]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"gp-p-2",children:jsxRuntime.jsx(ThirdPartyPreview.default,{setting:{label:t,iconSvg:`<img class="gp-w-[24px] gp-border gp-border-[#494949] gp-rounded-[3px]" src="${KlarmaMessaging.default.logoUrl}">`}})})})},KlarnaMessaging=({setting:e})=>jsxRuntime.jsx("div",{style:{...core.makeStyleResponsive("ta",e?.align)},children:jsxRuntime.jsx(KlarnaMessagingContent,{})});exports.default=KlarnaMessaging;
