{"version":3,"file":"useChartAnimation.cjs","names":["_react","require","_AnimationContext","_chartTokens","useChartAnimation","hasAnimations","useAnimation","useMemo","duration","chartTokens","ChartAnimationDuration","exports"],"sources":["../../../src/charts/useChartAnimation.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nimport { useAnimation } from \"../AnimationContext.js\";\nimport { chartTokens } from \"./utils/chartTokens.js\";\n\n/** Returns the stable Highcharts animation setting. */\nexport const useChartAnimation = () => {\n  const hasAnimations = useAnimation();\n\n  return useMemo(\n    () =>\n      hasAnimations\n        ? { duration: chartTokens.ChartAnimationDuration }\n        : (false as const),\n    [hasAnimations],\n  );\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQO,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAMC,aAAa,GAAG,IAAAC,8BAAY,EAAC,CAAC;EAEpC,OAAO,IAAAC,cAAO,EACZ,MACEF,aAAa,GACT;IAAEG,QAAQ,EAAEC,wBAAW,CAACC;EAAuB,CAAC,GAC/C,KAAe,EACtB,CAACL,aAAa,CAChB,CAAC;AACH,CAAC;AAACM,OAAA,CAAAP,iBAAA,GAAAA,iBAAA","ignoreList":[]}