{"version":3,"file":"450.chunk.8715e2e488707d4510cb.js","mappings":"w4BA6CO,MAAMA,EAASC,EAAAA,YAAiD,CAACC,EAAOC,KAC3E,MAAM,SAAEC,EAAQ,MAAEC,GAA+BH,EAArBI,EAAgBC,EAAKL,EAAKM,IAChD,KAAEC,GAASH,EAEjB,OAAIG,GAAQA,IAASC,EAAAA,EAAWC,MAExBV,EAAAA,cAACW,EAAYC,EAAA,GAAKP,EAAgB,CAAED,MAAOA,EAAOF,IAAKA,IAClDC,GAMTH,EAAAA,cAACa,EAASD,EAAA,GAAKP,EAAgB,CAAEH,IAAKA,IACjCC,EACO,IAMdU,EAAYb,EAAAA,YAAoD,CAACC,EAAOC,KAC1E,MAAM,UAAEY,EAAS,SAAEX,EAAQ,KAAEY,EAAI,KAAEC,EAAI,KAAER,EAAI,SAAES,EAAW,UAA4BhB,EAAfiB,EAAUZ,EAAKL,EAAKkB,GAU3F,OACInB,EAAAA,cAAA,SAAAY,EAAA,GAAYM,EAAU,CAAEV,KAAMS,EAAUf,IAAKA,EAAKY,UARlDM,IACIZ,GAAQa,EAAAA,EAAO,YAADC,OAAad,IAC3BQ,GAAQK,EAAAA,EAAO,YAADC,OAAaN,IAC3BD,GAAQM,EAAAA,EAAO,YAADC,OAAaP,IAC3BD,KAKCX,EACI,IAIXQ,EAAeX,EAAAA,YAAiD,CAACC,EAAOC,KAC1E,MAAMqB,GAAkBC,EAAAA,EAAAA,MAClB,SAAErB,EAAQ,UAAEW,EAAS,MAAEV,EAAQmB,GAAwCtB,EAApBwB,EAAenB,EAAKL,EAAKyB,IAE5E,cAAEC,EAAa,mBAAEC,GAAuBxB,EAE9C,OACIJ,EAAAA,cAACa,EAASD,EAAA,GACFa,EAAe,CACnBX,UAAWM,IACPO,GAAiBN,EAAAA,EAAO,qBACxBO,GAAsBP,EAAAA,EAAO,oBAC7BP,GAEJZ,IAAKA,IAEJC,EACO,G","sources":["webpack://Kristiania.Web/./Features/Partials/Button/Button.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport type { ReactNode } from 'react';\nimport type { StrictOmit } from '../Utils/typeUtils';\nimport { useTheme } from '~/Features/Layouts/Theme/Context/ThemeContextProvider';\nimport type { Theme } from '~/Utils/Theme';\nimport styles from './Button.module.css';\nimport type { ButtonSize } from './ButtonSize.csharp';\nimport type { ButtonTier } from './ButtonTier.csharp';\nimport { ButtonType } from './ButtonType.csharp';\n\ntype HtmlButtonType = 'submit' | 'reset' | 'button';\n\nexport interface DefaultButtonProps {\n children: ReactNode;\n className?: string;\n htmltype?: HtmlButtonType;\n /* STYLES PROPS */\n size?: ButtonSize;\n tier?: ButtonTier;\n type?: ButtonType;\n theme?: Theme;\n}\n\ntype NativeButtonAttributes = Pick<\n React.ButtonHTMLAttributes,\n | 'aria-selected'\n | 'aria-controls'\n | 'aria-expanded'\n | 'role'\n | 'aria-haspopup'\n | 'aria-describedby'\n | 'aria-label'\n | 'tabIndex'\n | 'title'\n | 'id'\n | 'disabled'\n | 'draggable'\n | 'onClick'\n | 'onFocus'\n | 'onMouseDown'\n>;\n\nexport type ButtonProps = DefaultButtonProps & NativeButtonAttributes;\n\nexport const Button = React.forwardRef((props, ref) => {\n const { children, theme, ...passThroughProps } = props;\n const { type } = passThroughProps;\n\n if (type && type !== ButtonType.Clear) {\n return (\n \n {children}\n \n );\n }\n\n return (\n \n {children}\n \n );\n});\n\ntype RawButtonProps = StrictOmit;\n\nconst RawButton = React.forwardRef((props, ref) => {\n const { className, children, size, tier, type, htmltype = 'button', ...otherProps } = props;\n\n const getButtonClassName = () =>\n classNames(\n type && styles[`Variant--${type}`],\n tier && styles[`Variant--${tier}`],\n size && styles[`Variant--${size}`],\n className\n );\n\n return (\n \n );\n});\n\nconst ThemedButton = React.forwardRef((props, ref) => {\n const contextualTheme = useTheme();\n const { children, className, theme = contextualTheme, ...additionalProps } = props;\n\n const { withBoxShadow, withRoundedCorners } = theme;\n\n return (\n \n {children}\n \n );\n});\n"],"names":["Button","React","props","ref","children","theme","passThroughProps","_objectWithoutProperties","_excluded","type","ButtonType","Clear","ThemedButton","_extends","RawButton","className","size","tier","htmltype","otherProps","_excluded2","classNames","styles","concat","contextualTheme","useTheme","additionalProps","_excluded3","withBoxShadow","withRoundedCorners"],"sourceRoot":""}