{"version":3,"file":"index-b75a8e8e.js","sources":["../../src/components/Button/index.tsx"],"sourcesContent":["import React, { HTMLProps, ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { ErrorLogger } from 'utils/errorLogger';\n\ninterface Props extends HTMLProps {\n variant?: 'contained' | 'outlined' | 'text' | 'link';\n color?: 'primary' | 'secondary' | 'text';\n type?: 'submit' | 'button' | 'reset' | undefined;\n underline?: boolean;\n children: ReactNode;\n testId?: string\n ariaLabel?: string | null\n}\n\nfunction Button(props: Props) {\n const { className, variant = 'contained', color = 'primary', type = 'button', underline, children, testId, ariaLabel, ...restProps } = props;\n\n return (\n {\n let label = '';\n if (typeof children === 'string') {\n label = children;\n } else if (ariaLabel) {\n label = `ariaLabel-${ariaLabel}`;\n } else if (testId) {\n label = `testId-${testId}`;\n }\n\n if (label) {\n ErrorLogger.breadcrumb({ message: `name=${label}`, category: 'btn_click' });\n }\n }}\n >\n {children}\n \n );\n}\n\nexport { Button };\n"],"names":["Button","props","className","variant","color","type","underline","children","testId","ariaLabel","restProps","jsx","clsx","e","label","ErrorLogger"],"mappings":"6WAcA,SAASA,EAAOC,EAAc,CAC5B,KAAM,CAAE,UAAAC,EAAW,QAAAC,EAAU,YAAa,MAAAC,EAAQ,UAAW,KAAAC,EAAO,SAAU,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAQ,UAAAC,EAAW,GAAGC,CAAc,EAAAT,EAGrI,OAAAU,EAAC,SAAA,CACC,UAAWC,EACTT,IAAY,aAAe,mFAC3BA,IAAY,YAAc,oFAE1BA,IAAY,QAAU,4CAEtBC,IAAU,WAAa,yGACvBA,IAAU,aAAe,kDACzBA,IAAU,QAAU,eACpBE,GAAa,qCACbJ,CACF,EACA,KAAAG,EACA,cAAaG,GAAU,cACvB,aAAYC,GAAa,OACxB,GAAGC,EACJ,eAAiBG,GAAM,CACrB,IAAIC,EAAQ,GACR,OAAOP,GAAa,SACdO,EAAAP,EACCE,EACTK,EAAQ,aAAaL,IACZD,IACTM,EAAQ,UAAUN,KAGhBM,GACFC,EAAY,WAAW,CAAE,QAAS,QAAQD,IAAS,SAAU,YAAa,CAE9E,EAEC,SAAAP,CAAA,CAAA,CAGP"}