{"version":3,"sources":["../src/components/Button/ButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\nimport type { RefAttributes } from '@fluentui/react-utilities';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<\n  IBaseButtonProps &\n    // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n    React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n  const shimProps = shimButtonProps(props);\n\n  if (props.toggle) {\n    return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n  }\n  if (props.secondaryText || props.onRenderDescription?.(props)) {\n    return <CompoundButtonShim {...props} />;\n  }\n\n  return <Button {...(props as RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","Button","shimButtonProps","ToggleButtonShim","CompoundButtonShim","ButtonShim","forwardRef","props","_ref","shimProps","toggle","children","secondaryText","onRenderDescription"],"mappings":"AAAA;;;;;+BAaaK;;;;;;;iEAXU,QAAQ;iCAIR,6BAA6B;iCAGpB,uBAAoB;kCACnB,wBAAqB;oCACnB,0BAAuB;AAEnD,mBAAMA,WAAAA,GAITL,OAAMM,UAAU,CAAC,CAACC,OAAOC;QAMAD;IAL3B,MAAME,gBAAYP,gCAAAA,EAAgBK;IAElC,IAAIA,MAAMG,MAAM,EAAE;QAChB,OAAA,WAAA,GAAO,OAAA,aAAA,CAACP,kCAAAA,EAAqBI,OAAQA,MAAMI,QAAQ;IACrD;IACA,IAAIJ,MAAMK,aAAa,IAAA,CAAA,CAAIL,6BAAAA,MAAMM,mBAAAA,AAAmB,MAAA,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAAAA,IAAAA,CAAAA,OAA4BA,MAAAA,GAAQ;QAC7D,OAAA,WAAA,GAAO,OAAA,aAAA,CAACH,sCAAAA,EAAuBG;IACjC;IAEA,OAAA,WAAA,GAAO,OAAA,aAAA,CAACN,uBAAAA,EAAAA;QAAQ,GAAIM,KAAK;QAAwC,GAAGE,SAAS;;AAC/E,GAAG"}