{"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 { stringifyDataAttribute } from '../../../utils/stringifyDataAttribute';\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 state: OptionState = useOptionBase_unstable(props, ref);\n\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-disabled'] = stringifyDataAttribute(state.disabled);\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-selected'] = stringifyDataAttribute(state.selected);\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-multiselect'] = stringifyDataAttribute(state.multiselect);\n\n  return state;\n};\n"],"names":["useOption","props","ref","state","useOptionBase_unstable","root","stringifyDataAttribute","disabled","selected","multiselect"],"mappings":"AAAA;;;;;+BAYaA;;;eAAAA;;;+BAT0B;wCAGA;AAMhC,MAAMA,YAAY,CAACC,OAAoBC;IAC5C,MAAMC,QAAqBC,IAAAA,qCAAsB,EAACH,OAAOC;IAEzD,oDAAoD;IACpDC,MAAME,IAAI,CAAC,gBAAgB,GAAGC,IAAAA,8CAAsB,EAACH,MAAMI,QAAQ;IACnE,oDAAoD;IACpDJ,MAAME,IAAI,CAAC,gBAAgB,GAAGC,IAAAA,8CAAsB,EAACH,MAAMK,QAAQ;IACnE,oDAAoD;IACpDL,MAAME,IAAI,CAAC,mBAAmB,GAAGC,IAAAA,8CAAsB,EAACH,MAAMM,WAAW;IAEzE,OAAON;AACT"}