{"version":3,"file":"useOption.mjs","names":[],"sources":["../../../../../../packages/components/select-v2/src/useOption.ts"],"sourcesContent":["import type { OptionV2EmitFn, OptionV2Props } from './defaults'\n\nexport function useOption(\n  props: OptionV2Props,\n  { emit }: { emit: OptionV2EmitFn }\n) {\n  return {\n    hoverItem: () => {\n      if (!props.disabled) {\n        emit('hover', props.index)\n      }\n    },\n    selectOptionClick: () => {\n      if (!props.disabled) {\n        emit('select', props.item, props.index)\n      }\n    },\n  }\n}\n"],"mappings":";AAEA,SAAgB,UACd,OACA,EAAE,QACF;AACA,QAAO;EACL,iBAAiB;AACf,OAAI,CAAC,MAAM,SACT,MAAK,SAAS,MAAM,MAAM;;EAG9B,yBAAyB;AACvB,OAAI,CAAC,MAAM,SACT,MAAK,UAAU,MAAM,MAAM,MAAM,MAAM;;EAG5C"}