import { __makeTemplateObject } from "tslib";
import styled, { css } from "styled-components";
import { LIGHT_THEME } from "../Pallette/themes";
import InputBase from "../InputBase";
import { getTheme } from "../utils/theme/getTheme";
import { defaultThemeInputNumber } from "./themes";
var COMPONENT_NAME = "inputNumber";
export var InputNumberWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: flex;\n  align-items: center;\n  width: 100%;\n  gap: 8px;\n"], ["\n  display: flex;\n  align-items: center;\n  width: 100%;\n  gap: 8px;\n"])));
export var StepWrapper = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        componentName: COMPONENT_NAME,
        theme: props.theme,
        defaultTheme: defaultThemeInputNumber
    })
}); })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  height: 36px;\n  user-select: none;\n  -webkit-user-select: none;\n\n  div {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 16px;\n    height: 16px;\n    border-radius: 4px;\n    cursor: ", ";\n\n    ", ";\n\n    ", "\n  }\n"], ["\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  height: 36px;\n  user-select: none;\n  -webkit-user-select: none;\n\n  div {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 16px;\n    height: 16px;\n    border-radius: 4px;\n    cursor: ", ";\n\n    ", ";\n\n    ", "\n  }\n"])), function (_a) {
    var isDisabled = _a.isDisabled;
    return (isDisabled ? "not-allowed" : "pointer");
}, function (_a) {
    var theme = _a.theme;
    return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n        background: ", ";\n        svg {\n          color: ", ";\n        }\n      "], ["\n        background: ", ";\n        svg {\n          color: ", ";\n        }\n      "])), theme.components[COMPONENT_NAME].backgroundStep, theme.components[COMPONENT_NAME].iconColorStep);
}, function (_a) {
    var theme = _a.theme, isDisabled = _a.isDisabled;
    return isDisabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n        background: ", ";\n        svg {\n          color: ", ";\n        }\n      "], ["\n        background: ", ";\n        svg {\n          color: ", ";\n        }\n      "])), theme.components[COMPONENT_NAME].backgroundStepDisabled, theme.components[COMPONENT_NAME].iconColorStepDisabled);
});
StepWrapper.defaultProps = {
    theme: LIGHT_THEME
};
export var InputNumberStyled = styled(InputBase).attrs(function (props) { return ({
    theme: getTheme({
        componentName: COMPONENT_NAME,
        theme: props.theme,
        defaultTheme: defaultThemeInputNumber
    })
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n  padding-right: 16px;\n  ", " {\n    div {\n      &:hover {\n        ", ";\n      }\n    }\n  }\n\n  input {\n    ::placeholder {\n      ", "\n    }\n  }\n"], ["\n  padding-right: 16px;\n  ", " {\n    div {\n      &:hover {\n        ", ";\n      }\n    }\n  }\n\n  input {\n    ::placeholder {\n      ", "\n    }\n  }\n"])), StepWrapper, function (_a) {
    var theme = _a.theme;
    return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n          background: ", ";\n\n          svg {\n            color: ", ";\n          }\n        "], ["\n          background: ", ";\n\n          svg {\n            color: ", ";\n          }\n        "])), theme.components[COMPONENT_NAME].backgroundStepHover, theme.components[COMPONENT_NAME].iconColorStepHover);
}, function (_a) {
    var theme = _a.theme, isReadOnly = _a.isReadOnly;
    return isReadOnly && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n          color: ", ";\n        "], ["\n          color: ", ";\n        "])), theme.components[COMPONENT_NAME].colorReadOnly);
});
InputNumberStyled.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
