{"version":3,"sources":["../src/components/Dropdown/Option/useOption.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useOptionBase_unstable } from '@fluentui/react-combobox';\n\nimport type { OptionProps, OptionState } from './Option.types';\nimport { toDataAttributeValue } from '../../../utils/toDataAttributeValue';\n\n/**\n * Returns the state for an Option component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderOption`.\n */\nexport const useOption = (props: OptionProps, ref: React.Ref<HTMLElement>): OptionState => {\n  const baseState = useOptionBase_unstable(props, ref);\n\n  const state: OptionState = {\n    ...baseState,\n    root: {\n      ...baseState.root,\n      'data-disabled': toDataAttributeValue(baseState.disabled),\n      'data-selected': toDataAttributeValue(baseState.selected),\n      'data-multiselect': toDataAttributeValue(baseState.multiselect),\n    },\n  };\n\n  return state;\n};\n"],"names":["useOption","props","ref","baseState","useOptionBase_unstable","state","root","toDataAttributeValue","disabled","selected","multiselect"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;+BAT0B;sCAGF;AAM9B,MAAMA,YAAY,CAACC,OAAoBC;IAC5C,MAAMC,YAAYC,IAAAA,qCAAsB,EAACH,OAAOC;IAEhD,MAAMG,QAAqB;QACzB,GAAGF,SAAS;QACZG,MAAM;YACJ,GAAGH,UAAUG,IAAI;YACjB,iBAAiBC,IAAAA,0CAAoB,EAACJ,UAAUK,QAAQ;YACxD,iBAAiBD,IAAAA,0CAAoB,EAACJ,UAAUM,QAAQ;YACxD,oBAAoBF,IAAAA,0CAAoB,EAACJ,UAAUO,WAAW;QAChE;IACF;IAEA,OAAOL;AACT"}