{"version":3,"file":"PlaybackButton.CIxiotRy.mjs","names":["forwardRef","_jsx","React.useState","_jsxs","_jsx","__esmMin","init_npm_react_18_3_1","_e","p","c","J","init_jsx_runtime","useLocaleInfo","init_framer_BWzg2IRg","addPropertyControls","ControlType","withMouseOnlyCarouselHover","Component","props","ref","style","onMouseEnter","onMouseLeave","onPointerEnter","onPointerLeave","rest","handlePointerEnter","event","handlePointerLeave","init_CarouselPointerHover","PlaybackButton","playing","kind","showLabel","touchOnly","hoverSpacing","onPress","activeLocale","language","languageById","copy","labels","focused","setFocused","label","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,SAAgBgB,EAA2BC,EAAU,CAAC,MAAoBjB,gBAAW,SAAgCkB,EAAMC,EAAI,CAAC,GAAK,CAACC,QAAMC,eAAaC,eAAaC,iBAAeC,iBAAe,GAAGC,GAAMP,EAAM,SAASQ,EAAmBC,EAAM,CAACJ,IAA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