{"version":3,"sources":["../../../../src/components/SwatchPicker/ImageSwatch/useImageSwatch.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useImageSwatchBase_unstable } from '@fluentui/react-swatch-picker';\nimport { toDataAttributeValue } from '../../../utils/toDataAttributeValue';\nimport type { ImageSwatchProps, ImageSwatchState } from './ImageSwatch.types';\n\nexport const useImageSwatch = (props: ImageSwatchProps, ref: React.Ref<HTMLButtonElement>): ImageSwatchState => {\n  const state: ImageSwatchState = useImageSwatchBase_unstable(props, ref);\n\n  // eslint-disable-next-line react-hooks/immutability\n  state.root.focusgroupstart = toDataAttributeValue(state.selected);\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-selected'] = toDataAttributeValue(state.selected);\n  // eslint-disable-next-line react-hooks/immutability\n  state.root['data-disabled'] = toDataAttributeValue(props.disabled);\n\n  return state;\n};\n"],"names":["useImageSwatch","props","ref","state","useImageSwatchBase_unstable","root","focusgroupstart","toDataAttributeValue","selected","disabled"],"mappings":"AAAA;;;;;+BAOaA;;;eAAAA;;;mCAJ+B;sCACP;AAG9B,MAAMA,iBAAiB,CAACC,OAAyBC;IACtD,MAAMC,QAA0BC,IAAAA,8CAA2B,EAACH,OAAOC;IAEnE,oDAAoD;IACpDC,MAAME,IAAI,CAACC,eAAe,GAAGC,IAAAA,0CAAoB,EAACJ,MAAMK,QAAQ;IAChE,oDAAoD;IACpDL,MAAME,IAAI,CAAC,gBAAgB,GAAGE,IAAAA,0CAAoB,EAACJ,MAAMK,QAAQ;IACjE,oDAAoD;IACpDL,MAAME,IAAI,CAAC,gBAAgB,GAAGE,IAAAA,0CAAoB,EAACN,MAAMQ,QAAQ;IAEjE,OAAON;AACT"}