{"version":3,"file":"ScrollArrows.CPPdGGph.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/2PwYrtD1Azlsnxsi0JOb/Syve2JHf89wcWw4PS5lC/ScrollArrows.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Scroll Arrows\n * Scrolls a horizontal row (identified by its element id) left/right.\n *\n * @framerIntrinsicWidth 72\n * @framerIntrinsicHeight 32\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ScrollArrows(props){const{targetId=\"case-galleri\",step=220,color=\"#000000\",size=28,gap=16,style}=props;const scroll=useCallback(dir=>{if(typeof document===\"undefined\")return;const el=document.getElementById(targetId);if(!el)return;el.scrollBy({left:dir*step,behavior:\"smooth\"});},[targetId,step]);const btn={width:size,height:size,padding:0,border:\"none\",background:\"transparent\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color};return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",display:\"flex\",flexDirection:\"row\",alignItems:\"center\",gap,minWidth:\"max-content\"},role:\"group\",\"aria-label\":\"Bla i galleri\",children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:btn,onClick:()=>scroll(-1),\"aria-label\":\"Forrige\",children:/*#__PURE__*/_jsx(\"svg\",{width:size*.5,height:size*.5,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.75\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 5l-7 7 7 7\"})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:btn,onClick:()=>scroll(1),\"aria-label\":\"Neste\",children:/*#__PURE__*/_jsx(\"svg\",{width:size*.5,height:size*.5,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.75\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 5l7 7-7 7\"})})})]});}addPropertyControls(ScrollArrows,{targetId:{type:ControlType.String,title:\"Target ID\",defaultValue:\"case-galleri\"},step:{type:ControlType.Number,title:\"Step\",defaultValue:220,min:50,max:800,step:10,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:28,min:20,max:48,step:2,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:40,step:2,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollArrows\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"32\",\"framerIntrinsicWidth\":\"72\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollArrows.map"],"mappings":"kLASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,WAAS,eAAe,OAAK,IAAI,QAAM,UAAU,OAAK,GAAG,MAAI,GAAG,SAAO,EAAY,EAAOA,EAAY,GAAK,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAM,EAAG,SAAS,eAAe,CAAQ,EAAM,GAAU,EAAG,SAAS,CAAC,KAAK,EAAI,EAAK,SAAS,QAAQ,CAAC,CAAE,EAAE,CAAC,EAAS,CAAI,CAAC,EAAQ,EAAI,CAAC,MAAM,EAAK,OAAO,EAAK,QAAQ,EAAE,OAAO,OAAO,WAAW,cAAc,OAAO,UAAU,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAK,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,OAAO,cAAc,MAAM,WAAW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