{"ast":null,"code":"import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.js';\nimport { getCurrentTreeVariants } from './utils.js';\nfunction useCreateMotionContext(props, isStatic) {\n  var _a = getCurrentTreeVariants(props, useContext(MotionContext)),\n    initial = _a.initial,\n    animate = _a.animate;\n  return useMemo(function () {\n    return {\n      initial: initial,\n      animate: animate\n    };\n  },\n  /**\n   * Only break memoisation in static mode\n   */\n  isStatic ? [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)] : []);\n}\nfunction variantLabelsAsDependency(prop) {\n  return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\nexport { useCreateMotionContext };","map":{"version":3,"names":["useMemo","useContext","MotionContext","getCurrentTreeVariants","useCreateMotionContext","props","isStatic","_a","initial","animate","variantLabelsAsDependency","prop","Array","isArray","join"],"sources":["D:/DSP_Management/node_modules/framer-motion/dist/es/context/MotionContext/create.js"],"sourcesContent":["import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.js';\nimport { getCurrentTreeVariants } from './utils.js';\n\nfunction useCreateMotionContext(props, isStatic) {\n    var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n    return useMemo(function () { return ({ initial: initial, animate: animate }); }, \n    /**\n     * Only break memoisation in static mode\n     */\n    isStatic\n        ? [\n            variantLabelsAsDependency(initial),\n            variantLabelsAsDependency(animate),\n        ]\n        : []);\n}\nfunction variantLabelsAsDependency(prop) {\n    return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,UAAU,QAAQ,OAAO;AAC3C,SAASC,aAAa,QAAQ,YAAY;AAC1C,SAASC,sBAAsB,QAAQ,YAAY;AAEnD,SAASC,sBAAsBA,CAACC,KAAK,EAAEC,QAAQ,EAAE;EAC7C,IAAIC,EAAE,GAAGJ,sBAAsB,CAACE,KAAK,EAAEJ,UAAU,CAACC,aAAa,CAAC,CAAC;IAAEM,OAAO,GAAGD,EAAE,CAACC,OAAO;IAAEC,OAAO,GAAGF,EAAE,CAACE,OAAO;EAC7G,OAAOT,OAAO,CAAC,YAAY;IAAE,OAAQ;MAAEQ,OAAO,EAAEA,OAAO;MAAEC,OAAO,EAAEA;IAAQ,CAAC;EAAG,CAAC;EAC/E;AACJ;AACA;EACIH,QAAQ,GACF,CACEI,yBAAyB,CAACF,OAAO,CAAC,EAClCE,yBAAyB,CAACD,OAAO,CAAC,CACrC,GACC,EAAE,CAAC;AACb;AACA,SAASC,yBAAyBA,CAACC,IAAI,EAAE;EACrC,OAAOC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,GAAGA,IAAI,CAACG,IAAI,CAAC,GAAG,CAAC,GAAGH,IAAI;AACtD;AAEA,SAASP,sBAAsB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}