{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/y5QpiQywqR5apLapSs7B/yWitO6uyh98OGN3pmgZJ/VideoSliderCMS.js"],
  "sourcesContent": ["// import type { ComponentType } from \"react\"\n// // Define animated and static variant mappings\n// const variants = [\n//     { animated: \"DT XL - Video 1\", static: \"DT XL - Video 1 Static\" },\n//     { animated: \"DT XL - Video 2\", static: \"DT XL - Video 2 Static\" },\n//     { animated: \"DT XL - Video 3\", static: \"DT XL - Video 3 Static\" },\n//     { animated: \"DT XL - Video 4\", static: \"DT XL - Video 4 Static\" },\n//     { animated: \"DT XL - Video 5\", static: \"DT XL - Video 5 Static\" },\n//     { animated: \"DT - Video 1\", static: \"DT - Video 1 Static\" },\n//     { animated: \"DT - Video 2\", static: \"DT - Video 2 Static\" },\n//     { animated: \"DT - Video 3\", static: \"DT - Video 3 Static\" },\n//     { animated: \"DT - Video 4\", static: \"DT - Video 4 Static\" },\n//     { animated: \"DT - Video 5\", static: \"DT - Video 5 Static\" },\n// ]\n// // Helper to read a cookie\n// function getCookie(name) {\n//     const value = `; ${document.cookie}`\n//     const parts = value.split(`; ${name}=`)\n//     if (parts.length === 2) return parts.pop().split(\";\").shift()\n//     return null\n// }\n// // Helper to set a cookie\n// function setCookie(name, value, days) {\n//     const date = new Date()\n//     date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)\n//     document.cookie = `${name}=${value}; expires=${date.toUTCString()}; path=/; SameSite=None; Secure`\n// }\n// // Override for managing variants with cookies\n// export function withCookieVariant(Component): ComponentType {\n//     return (props) => {\n//         const currentVariant = props.name\n//         // Skip processing for Tablet and Phone variants\n//         if (\n//             !currentVariant ||\n//             currentVariant.includes(\"Tablet\") ||\n//             currentVariant.includes(\"Phone\")\n//         ) {\n//             return <Component {...props} />\n//         }\n//         // Find the variant mapping\n//         const variantMapping = variants.find(\n//             (v) => v.animated === currentVariant\n//         )\n//         if (!variantMapping) return <Component {...props} />\n//         // Determine the active state from cookies\n//         const cookieKey = `variant-${currentVariant}`\n//         const isStatic = getCookie(cookieKey) === \"static\"\n//         // Choose the correct variant\n//         const targetVariant = isStatic\n//             ? variantMapping.static\n//             : variantMapping.animated\n//         return <Component {...props} variant={targetVariant} />\n//     }\n// }\n// // Override to toggle the variant state using cookies\n// export function withCookieHandler(Component): ComponentType {\n//     return (props) => {\n//         const currentVariant = props.name\n//         // Skip processing for Tablet and Phone variants\n//         if (\n//             !currentVariant ||\n//             currentVariant.includes(\"Tablet\") ||\n//             currentVariant.includes(\"Phone\")\n//         ) {\n//             return <Component {...props} />\n//         }\n//         // Find the variant mapping\n//         const variantMapping = variants.find(\n//             (v) => v.animated === currentVariant\n//         )\n//         if (!variantMapping) return <Component {...props} />\n//         // Handle click to toggle the variant\n//         const handleClick = () => {\n//             const cookieKey = `variant-${currentVariant}`\n//             const isStatic = getCookie(cookieKey) === \"static\"\n//             setCookie(cookieKey, isStatic ? \"animated\" : \"static\", 365) // Toggle and persist for 1 year\n//         }\n//         return <Component {...props} onClick={handleClick} />\n//     }\n// }\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Instead of just \"state\", use two properties:\nconst useStore=createStore({closeState:\"Active\",variantState:\"Default\"});// Wrap your \"variant\" button\nexport function withVariant(Component){return props=>{const[store,setStore]=useStore();const handleVariantClick=()=>{// Toggle variant between \"Default\" and \"Static\"\nconst newVariant=store.variantState===\"Default\"?\"Static\":\"Default\";// Also, if you want the close button to update *immediately*\n// whenever the variant is clicked, do it here.\n// If not, omit it.\nsetStore({...store,variantState:newVariant});};const variant=store.variantState===\"Default\"?\"DT XL - Video 1\":\"DT XL - Video 1 Static\";return /*#__PURE__*/_jsx(Component,{...props,variant:variant,onClick:handleVariantClick});};}// Wrap your \"close\" button\nexport function withCloseButton(Component){return props=>{const[store,setStore]=useStore();const handleCloseClick=()=>{// On close click, you want to:\n// 1) Turn close button -> \"Disabled\"\n// 2) Reset variant -> \"Default\"\nsetStore({...store,closeState:\"Disabled\",variantState:\"Default\"});// If you also want the close button to go back to \"Active\"\n// after 1 second (so the user can repeat the action),\n// add a timeout:\nsetTimeout(()=>{setStore({...store,closeState:\"Active\"});},1e3);};const variant=store.closeState===\"Active\"?\"Active\":\"Disabled\";return /*#__PURE__*/_jsx(Component,{...props,variant:variant,onClick:handleCloseClick});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCloseButton\":{\"type\":\"reactHoc\",\"name\":\"withCloseButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVariant\":{\"type\":\"reactHoc\",\"name\":\"withVariant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoSliderCMS.map"],
  "mappings": "kFAiFA,IAAMA,EAASC,EAAY,CAAC,WAAW,SAAS,aAAa,SAAS,CAAC,EAMhE,SAASC,EAAgBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAS,EAAQC,EAAiB,IAAI,CAGtHF,EAAS,CAAC,GAAGD,EAAM,WAAW,WAAW,aAAa,SAAS,CAAC,EAGhE,WAAW,IAAI,CAACC,EAAS,CAAC,GAAGD,EAAM,WAAW,QAAQ,CAAC,CAAE,EAAE,GAAG,CAAE,EAAQI,EAAQJ,EAAM,aAAa,SAAS,SAAS,WAAW,OAAoBK,EAAKP,EAAU,CAAC,GAAGC,EAAM,QAAQK,EAAQ,QAAQD,CAAgB,CAAC,CAAE,CAAE",
  "names": ["useStore", "createStore", "withCloseButton", "Component", "props", "store", "setStore", "useStore", "handleCloseClick", "variant", "p"]
}
