{"version":3,"sources":["../src/components/Field/useField.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useFieldBase_unstable } from '@fluentui/react-field';\n\nimport type { FieldProps, FieldState } from './Field.types';\n\n/**\n * Returns the state for a Field component, given its props and ref.\n * The returned state can be modified with hooks before being passed to `renderField`.\n */\nexport const useField = (props: FieldProps, ref: React.Ref<HTMLDivElement>): FieldState => {\n  const state: FieldState = useFieldBase_unstable(props, ref);\n\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-validate-state'] = state.validationState;\n\n  return state;\n};\n"],"names":["useField","props","ref","state","useFieldBase_unstable","root","validationState"],"mappings":"AAAA;;;;;+BAWaA;;;eAAAA;;;4BARyB;AAQ/B,MAAMA,WAAW,CAACC,OAAmBC;IAC1C,MAAMC,QAAoBC,IAAAA,iCAAqB,EAACH,OAAOC;IAEvD,oDAAoD;IACpDC,MAAME,IAAI,CAAC,sBAAsB,GAAGF,MAAMG,eAAe;IAEzD,OAAOH;AACT"}