{"version":3,"file":"PlaybackButton.CSiWdMsL.mjs","names":["React.useState","__esmMin","init_npm_react_18_3_1","_e","p","c","J","init_jsx_runtime","useLocaleInfo","init_framer_BpuvUAiZ","addPropertyControls","ControlType","withMouseOnlyCarouselHover","rest","props","handlePointerEnter","onPointerEnter","event","onMouseEnter","handlePointerLeave","onPointerLeave","onMouseLeave","Component","style","init_CarouselPointerHover","PlaybackButton","language","languageById","activeLocale","copy","labels","focused","setFocused","label","playing","kind","touchOnly","hoverSpacing","onPress","showLabel","init_PlaybackButton"],"sources":["https:/framerusercontent.com/modules/kCqYWRNt9PDsGDaJsJFE/DgjWHimFU4XBE7Mva3MO/CarouselPointerHover.js","https:/framerusercontent.com/modules/OZjlgGoQ9ESv7Fn2FbvK/y57oPvkmalyO1XUtvsE9/PlaybackButton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function withMouseOnlyCarouselHover(Component){return /*#__PURE__*/forwardRef(function MouseOnlyCarouselHover(props,ref){const{style,onMouseEnter,onMouseLeave,onPointerEnter,onPointerLeave,...rest}=props;function handlePointerEnter(event){onPointerEnter?.(event);if(event.pointerType===\"mouse\")onMouseEnter?.(event);}function handlePointerLeave(event){onPointerLeave?.(event);if(event.pointerType===\"mouse\")onMouseLeave?.(event);}return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,style:{...style},onMouseEnter:undefined,onMouseLeave:undefined,onPointerEnter:handlePointerEnter,onPointerLeave:handlePointerLeave});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withMouseOnlyCarouselHover\":{\"type\":\"reactHoc\",\"name\":\"withMouseOnlyCarouselHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CarouselPointerHover.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";const languageById={LTGGHw3Zm:\"en\",c15EFEJCR:\"fr\",o4h2qf2NF:\"es\",FSvt01MIe:\"hi\"};const labels={no:{pause:\"Pause\",play:\"Spill av\",ticker:\"karusell\",magazine:\"bladvisning\"},en:{pause:\"Pause\",play:\"Play\",ticker:\"carousel\",magazine:\"magazine slideshow\"},fr:{pause:\"Pause\",play:\"Lire\",ticker:\"carrousel\",magazine:\"diaporama du magazine\"},es:{pause:\"Pausa\",play:\"Reproducir\",ticker:\"carrusel\",magazine:\"presentaci\\xf3n de la revista\"},hi:{pause:\"रोकें\",play:\"चलाएँ\",ticker:\"कैरोसेल\",magazine:\"पत्रिका का स्लाइडशो\"}};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 44\n */export default function PlaybackButton({playing=false,kind=\"ticker\",showLabel=true,touchOnly=false,hoverSpacing=0,onPress,style}){const{activeLocale}=useLocaleInfo();const language=languageById[activeLocale?.id||\"\"]||\"no\";const copy=labels[language];const[focused,setFocused]=React.useState(false);const label=(playing?copy.pause:copy.play)+\": \"+copy[kind];return /*#__PURE__*/_jsxs(\"div\",{className:touchOnly?\"legedom-carousel-controls legedom-carousel-controls-touch\":\"legedom-carousel-controls\",style:{...style,\"--legedom-hover-spacing\":`${hoverSpacing}px`,boxSizing:\"border-box\",width:\"100%\",height:\"auto\",padding:\"10px 0\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .legedom-carousel-controls { display: flex; }\n                @media (any-hover: hover) {\n                    .legedom-carousel-controls-touch { display: flex !important; height: var(--legedom-hover-spacing, 0px) !important; padding: 0 !important; }\n                    .legedom-carousel-controls-touch > button { display: none !important; }\n                }\n            `}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":label,\"aria-pressed\":playing,title:label,onClick:onPress,onFocus:()=>setFocused(true),onBlur:()=>setFocused(false),style:{appearance:\"none\",boxSizing:\"border-box\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",border:0,borderRadius:6,background:\"var(--token-c3b65f54-84b5-4a4f-8ead-47c58aff07b2, #4e068a)\",color:\"var(--token-f31f1ce1-16c9-4281-87ba-360912934036, #fff)\",fontFamily:\"Open Runde, sans-serif\",fontSize:13,fontWeight:600,lineHeight:\"16px\",whiteSpace:\"nowrap\",padding:\"4px 16px\",minWidth:68,height:24,cursor:\"pointer\",outline:focused?\"2px solid currentColor\":\"none\",outlineOffset:2},children:/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",children:showLabel?playing?copy.pause:copy.play:playing?\"Ⅱ\":\"▶\"})})]});}addPropertyControls(PlaybackButton,{playing:{type:ControlType.Boolean,title:\"Playing\",defaultValue:false},kind:{type:ControlType.Enum,title:\"Content\",options:[\"ticker\",\"magazine\"],optionTitles:[\"Scrolling content\",\"Magazine\"],defaultValue:\"ticker\"},showLabel:{type:ControlType.Boolean,title:\"Show text\",defaultValue:true},touchOnly:{type:ControlType.Boolean,title:\"Touch only\",defaultValue:false},hoverSpacing:{type:ControlType.Number,title:\"Hover spacing\",defaultValue:0,min:0,max:20,unit:\"px\"},onPress:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PlaybackButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"100\",\"framerIntrinsicHeight\":\"44\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PlaybackButton.map"],"mappings":"A,gMAAyE,SAAgBY,EAA2B,EAAU,CAAC,MAAoB,gBAAW,SAAgC,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,eAAa,eAAa,iBAAe,iBAAe,GAAGC,GAAMC,EAAM,SAASC,EAAmB,EAAM,CAACC,IAAiBC,CAAK,EAAKA,EAAM,cAAc,SAAQC,IAAeD,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