import apollo_core from "@uipath/apollo-core";
const MuiButton = (palette)=>({
        root: {
            height: '40px',
            borderRadius: '3px',
            boxShadow: 'none',
            fontStyle: 'normal',
            fontWeight: apollo_core.FontFamily.FontWeightSemibold,
            fontSize: apollo_core.FontFamily.FontMSize,
            padding: '6px 16px',
            lineHeight: apollo_core.FontFamily.FontMLineHeight,
            textTransform: 'none',
            '&:focus-visible': {
                outlineOffset: '1px'
            },
            '&.warning': {
                border: `1px solid ${palette.semantic.colorWarn}`,
                backgroundColor: `${palette.semantic.colorWarn}`,
                color: `${palette.semantic.colorForegroundInverse}`,
                '&.MuiButton-containedSecondary': {
                    color: `${palette.semantic.colorForegroundInverse}`
                },
                '&&:hover': {
                    backgroundColor: `${palette.semantic.colorWarnDarker}`,
                    border: `1px solid ${palette.semantic.colorWarnDarker}`,
                    color: `${palette.semantic.colorForegroundInverse}`,
                    boxShadow: 'none'
                },
                '&&:focus': {
                    boxShadow: 'none',
                    border: `1px solid ${palette.semantic.colorWarnDarker}`,
                    backgroundColor: `${palette.semantic.colorWarnDarker}`,
                    color: `${palette.semantic.colorForegroundInverse}`
                },
                '&&:disabled': {
                    backgroundColor: `${palette.semantic.colorBackgroundDisabled}`,
                    color: `${palette.semantic.colorForegroundDisable}`,
                    border: `1px solid ${palette.semantic.colorBackgroundDisabled}`
                }
            }
        },
        contained: {
            border: `1px solid ${palette.semantic.colorPrimary}`,
            backgroundColor: `${palette.semantic.colorPrimary}`,
            color: `${palette.semantic.colorForegroundInverse}`,
            '&.MuiButton-containedSecondary': {
                color: `${palette.semantic.colorForegroundInverse}`
            },
            '&&:hover': {
                backgroundColor: `${palette.semantic.colorPrimaryHover}`,
                border: `1px solid ${palette.semantic.colorPrimaryHover}`,
                color: `${palette.semantic.colorForegroundInverse}`,
                boxShadow: 'none'
            },
            '&&:focus': {
                boxShadow: 'none',
                border: `1px solid ${palette.semantic.colorPrimaryFocused}`,
                color: `${palette.semantic.colorForegroundInverse}`
            },
            '&&:disabled': {
                backgroundColor: `${palette.semantic.colorBackgroundDisabled}`,
                color: `${palette.semantic.colorForegroundDisable}`,
                border: `1px solid ${palette.semantic.colorBackgroundDisabled}`
            },
            '&&:focus-visible': {
                backgroundColor: palette.semantic.colorPrimaryFocused
            },
            '&&:active': {
                backgroundColor: palette.semantic.colorPrimaryPressed
            }
        },
        outlined: {
            border: `1px solid ${palette.semantic.colorBorderDeEmp}`,
            background: `${palette.semantic.colorBackground}`,
            color: `${palette.semantic.colorPrimary}`,
            '&&': {
                borderColor: palette.semantic.colorBorder
            },
            '&&:hover': {
                backgroundColor: palette.semantic.colorSecondaryFocused
            },
            '&&:focus': {
                backgroundColor: palette.semantic.colorSecondaryFocused
            },
            '&&:disabled': {
                backgroundColor: `${palette.semantic.colorBackgroundDisabled}`,
                color: `${palette.semantic.colorForegroundDisable}`
            },
            '&&:focus-visible': {
                backgroundColor: palette.semantic.colorSecondaryFocused,
                outlineOffset: 0
            },
            '&&:active': {
                backgroundColor: palette.semantic.colorSecondaryPressed
            }
        },
        text: {
            '& .MuiButton-label': {
                paddingLeft: apollo_core.Padding.PadL,
                paddingRight: apollo_core.Padding.PadL
            },
            '&&:hover': {
                backgroundColor: palette.semantic.colorSecondaryFocused
            },
            '&&:focus': {
                backgroundColor: palette.semantic.colorSecondaryFocused
            },
            '&&:disabled': {
                color: `${palette.semantic.colorForegroundDisable}`
            },
            '&&:focus-visible': {
                backgroundColor: palette.semantic.colorSecondaryFocused
            },
            '&&:active': {
                backgroundColor: palette.semantic.colorSecondaryPressed
            }
        },
        sizeSmall: {
            height: '32px',
            fontSize: apollo_core.FontFamily.FontMSize,
            lineHeight: apollo_core.FontFamily.FontMLineHeight
        },
        sizeLarge: {
            height: '40px',
            fontSize: apollo_core.FontFamily.FontMSize,
            lineHeight: apollo_core.FontFamily.FontMLineHeight
        },
        startIcon: {
            fontSize: apollo_core.Icon.IconXs,
            lineHeight: apollo_core.Icon.IconXs,
            '& img': {
                width: apollo_core.Icon.IconXs,
                height: apollo_core.Icon.IconXs
            },
            '& svg': {
                width: apollo_core.Icon.IconXs
            }
        },
        endIcon: {
            fontSize: apollo_core.Icon.IconXs,
            lineHeight: apollo_core.Icon.IconXs,
            '& img': {
                width: apollo_core.Icon.IconXs,
                height: apollo_core.Icon.IconXs
            },
            '& svg': {
                width: apollo_core.Icon.IconXs
            }
        }
    });
export { MuiButton };
