{"version":3,"file":"use-cache.mjs","sources":["../../../../../../../packages/components/virtual-list/src/hooks/use-cache.ts"],"sourcesContent":["import { computed, getCurrentInstance } from 'vue'\nimport memo from 'lodash/memoize'\nimport memoOne from 'memoize-one'\n\nimport type { VirtualizedProps } from '../props'\n\nexport const useCache = () => {\n  const vm = getCurrentInstance()!\n\n  const props = vm.proxy!.$props as VirtualizedProps\n\n  return computed(() => {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const _getItemStyleCache = (_: any, __: any, ___: any) => ({})\n    return props.perfMode\n      ? memo(_getItemStyleCache)\n      : memoOne(_getItemStyleCache)\n  })\n}\n"],"names":[],"mappings":";;;;MAMa,WAAW,MAAM;AAC5B,QAAM,KAAK;AAEX,QAAM,QAAQ,GAAG,MAAO;AAExB,SAAO,SAAS,MAAM;AAEpB,UAAM,qBAAqB,CAAC,GAAQ,IAAS;AAC7C,WAAO,MAAM,WACT,KAAK,sBACL,QAAQ;AAAA;AAAA;;;;"}