{"version":3,"file":"GuideShelfPager.YSmbqwra.mjs","names":["React.useState","React.useRef","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","de","window","init_framer_DJ_0WPVq","addPropertyControls","ControlType","GuideShelfPager","page","setPage","initialPage","navigated","setNavigated","navigation","scopePattern","scope","sectionId","horizontal","stories","videos","groupLabel","navigationLabel","controlStyle","buttonStyle","rootId","controls","preview","homePreviewLayers","shelf","root","slot","published","group","original","id","toggle","previous","step","track","first","second","stride","reduced","direction","style","init_GuideShelfPager"],"sources":["https:/framerusercontent.com/modules/r1eEKdF5PCQv2kXW3uSe/duJXnSub3Qx1J20Iqg5y/GuideShelfPager.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const scopePattern=/^(?:home-guide-(?:desktop|tablet|phone|phone-small)|(?:references-stories|blog-videos)-(?:desktop|tablet))$/;// The editor preview emits the original layer IDs. Published pages use the\n// authored element IDs. Match either form within this pager's own shelf.\nconst homePreviewLayers={\"home-guide-desktop\":{shelf:\"khMM6iCv5\",groups:[[\"dCN_fwLwr\",\"jlhbdxJq3\",\"QpiGMtgVB\"],[\"Z3vv39zJz\",\"TDxgg5O1b\",\"vd9D6S6nk\"]]},\"home-guide-phone\":{shelf:\"WgEiM96ww\",groups:[[\"OYp3L_4kM\",\"wshImuuzB\",\"SkH7SnZ0b\"],[\"OwrAxHNaq\",\"xAvbIUAN2\",\"Bkg0Mikt3\"]]}};const buttonStyle={display:\"grid\",placeItems:\"center\",width:32,height:32,padding:0,flex:\"0 0 32px\",border:0,borderRadius:\"50%\",background:\"#ebeff4\",color:\"#181818\",cursor:\"pointer\",touchAction:\"manipulation\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 111\n * @framerIntrinsicHeight 32\n */export default function GuideShelfPager({scope=\"\",initialPage=1,style}){const[page,setPage]=React.useState(initialPage===2?2:1);const[navigated,setNavigated]=React.useState(false);const navigation=React.useRef(null);if(!scopePattern.test(scope))return null;// Framer's breakpoint copies retain the original layer IDs in the rendered page.\nconst sectionId=scope.replace(/-tablet$/,\"-desktop\").replace(/-phone-small$/,\"-phone\");const horizontal=sectionId===\"home-guide-phone\";const stories=scope.startsWith(\"references-stories-\");const videos=scope.startsWith(\"blog-videos-\");const groupLabel=videos?\"video\":stories?\"hik\\xe2ye\":\"yazı\";const navigationLabel=horizontal?\"B\\xfcy\\xfcme Rehberi kartları\":videos?\"Video grupları\":stories?\"Marka Hik\\xe2yeleri sayfaları\":\"B\\xfcy\\xfcme Rehberi sayfaları\";const controlStyle=videos?{...buttonStyle,background:\"#fff\"}:buttonStyle;const rootId=videos?\"blog-cms-desktop-section\":sectionId;const controls=`[data-guide-pager=\"${scope}\"]`;const preview=homePreviewLayers[sectionId];const shelf=preview?`:is(#${rootId},#${preview.shelf})`:`#${rootId}`;const root=`${shelf}:has(${controls})`;const slot=group=>{const published=`[id^=\"${sectionId}-${group}-\"]`;const original=preview?.groups[group===1?0:1].map(id=>`#${id}`).join(\",\");return`${root} ${original?`:is(${published},${original})`:published}`;};const toggle=()=>{setNavigated(true);setPage(previous=>previous===1?2:1);};const step=direction=>{if(!horizontal){toggle();return;}const track=navigation.current?.closest(shelf)?.querySelector(':is(#home-guide-phone-scroll,[data-framer-name=\"B\\xfcy\\xfcme Rehberi — yatay kartlar\"])');const first=track?.children.item(0);const second=track?.children.item(1);if(!track||!first||!second)return;const stride=second.getBoundingClientRect().left-first.getBoundingClientRect().left;const reduced=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;track.scrollBy({left:stride*direction,behavior:reduced?\"instant\":\"smooth\"});};return /*#__PURE__*/_jsxs(\"nav\",{ref:navigation,\"aria-label\":navigationLabel,\"data-guide-pager\":scope,style:{...style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:24},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n            ${horizontal?\"\":`${slot(page===1?2:1)} { display: none !important; }`}\n            ${controls} button:focus-visible { outline: 2px solid #ffd523; outline-offset: 3px; }\n            @media (hover: hover) and (pointer: fine) {\n                ${controls} button:hover { background: #ffd523 !important; }\n            }\n            @media (prefers-reduced-motion: no-preference) {\n                ${controls} button { transition: background-color 140ms ease; }\n                ${!horizontal&&navigated?`${slot(page)} { animation: oztGuidePageIn 160ms cubic-bezier(.22,1,.36,1); }`:\"\"}\n            }\n            @keyframes oztGuidePageIn { from { opacity: .9; } to { opacity: 1; } }\n        `}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:controlStyle,onClick:()=>step(-1),\"aria-label\":horizontal?\"\\xd6nceki yazı\":`\\xd6nceki ${groupLabel} grubu`,children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",fill:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M13 8H3m0 0 4.5-4.5M3 8l4.5 4.5\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",style:controlStyle,onClick:()=>step(1),\"aria-label\":horizontal?\"Sonraki yazı\":`Sonraki ${groupLabel} grubu`,children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",fill:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M3 8h10m0 0L8.5 3.5M13 8l-4.5 4.5\",stroke:\"currentColor\",strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),!horizontal&&/*#__PURE__*/_jsxs(\"span\",{role:\"status\",\"aria-live\":\"polite\",\"aria-atomic\":\"true\",style:{position:\"absolute\",width:1,height:1,overflow:\"hidden\",clipPath:\"inset(50%)\",whiteSpace:\"nowrap\"},children:[groupLabel[0].toLocaleUpperCase(\"tr-TR\")+groupLabel.slice(1),\" grubu \",page,\" / 2\"]})]});}addPropertyControls(GuideShelfPager,{scope:{type:ControlType.String,title:\"Section ID\"},initialPage:{type:ControlType.Number,title:\"Start page\",min:1,max:2,step:1,defaultValue:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GuideShelfPager\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"111\",\"framerIntrinsicHeight\":\"32\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GuideShelfPager.map"],"mappings":"A,sMAOG,SAAwBc,EAAgB,CAAC,QAAM,GAAG,cAAY,EAAE,SAAO,CAAC,GAAK,CAACC,EAAKC,GAAShB,EAAeiB,IAAc,EAAE,EAAE,CAAC,EAAO,CAACC,EAAUC,GAAcnB,EAAe,EAAK,EAAQoB,EAAWnB,EAAa,IAAI,EAAE,GAAG,CAACoB,EAAa,KAAKC,CAAK,EAAE,OAAO,KAC/P,IAAMC,EAAUD,EAAM,QAAQ,WAAW,UAAU,CAAC,CAAC,QAAQ,gBAAgB,QAAQ,EAAQE,EAAWD,IAAY,mBAAyBE,EAAQH,EAAM,WAAW,qBAAqB,EAAQI,EAAOJ,EAAM,WAAW,cAAc,EAAQK,EAAWD,EAAO,QAAQD,EAAQ,SAAY,OAAaG,EAAgBJ,EAAW,0BAAgCE,EAAO,iBAAiBD,EAAQ,6BAAgC,2BAAuCI,EAAaH,EAAO,CAAC,GAAGI,EAAY,WAAW,MAAM,EAAEA,EAAkBC,EAAOL,EAAO,2BAA2BH,EAAgBS,EAAS,sBAAsBV,EAAM,IAAUW,EAAQC,EAAkBX,GAAiBY,EAAMF,EAAQ,QAAQF,EAAO,IAAIE,EAAQ,MAAM,GAAG,IAAIF,IAAeK,EAAK,GAAGD,EAAM,OAAOH,EAAS,GAASK,EAAK,GAAO,CAAC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