import { __makeTemplateObject } from "tslib";
import styled from "styled-components";
import { getTheme } from "../utils/theme/getTheme";
import { BorderRadius, Padding } from "../Pallette/style-utils";
import { Shape } from "../Pallette/Shape";
import { LIGHT_THEME } from "../Pallette/themes";
import { defaultThemeRoll } from "./theme";
var COMPONENT_NAME = "roll";
export var RollStyled = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeRoll,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  height: 100%;\n  ", ";\n\n  background: ", ";\n\n  .roll__header {\n    ", ";\n  }\n\n  .roll-anim {\n    min-height: 1px;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n\n  .roll-anim-enter {\n    opacity: 0;\n    transform: translateY(100%);\n  }\n  .roll-anim-enter-active {\n    opacity: 1;\n    transform: translateY(0%);\n  }\n  .roll-anim-exit {\n    opacity: 1;\n    transform: translateY(0%);\n  }\n  .roll-anim-exit-active {\n    opacity: 0;\n    transform: translateY(100%);\n  }\n  .roll-anim-enter-active,\n  .roll-anim-exit-active {\n    transition: opacity 500ms, transform 500ms;\n  }\n"], ["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  height: 100%;\n  ", ";\n\n  background: ", ";\n\n  .roll__header {\n    ", ";\n  }\n\n  .roll-anim {\n    min-height: 1px;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n  }\n\n  .roll-anim-enter {\n    opacity: 0;\n    transform: translateY(100%);\n  }\n  .roll-anim-enter-active {\n    opacity: 1;\n    transform: translateY(0%);\n  }\n  .roll-anim-exit {\n    opacity: 1;\n    transform: translateY(0%);\n  }\n  .roll-anim-exit-active {\n    opacity: 0;\n    transform: translateY(100%);\n  }\n  .roll-anim-enter-active,\n  .roll-anim-exit-active {\n    transition: opacity 500ms, transform 500ms;\n  }\n"])), BorderRadius.roundBorder(Shape.borderRadiusMedium), function (_a) {
    var theme = _a.theme, isOpenRoll = _a.isOpenRoll;
    return isOpenRoll && theme.components[COMPONENT_NAME].background;
}, function (_a) {
    var theme = _a.theme, isOpenRoll = _a.isOpenRoll;
    return isOpenRoll && theme.shadows.sp.bottom;
});
RollStyled.defaultProps = {
    theme: LIGHT_THEME
};
export var RollContentWrapper = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeRoll,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  justify-content: space-between;\n  ", "\n  height: 100%;\n  overflow: auto;\n\n  background: ", ";\n  ", ";\n"], ["\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  justify-content: space-between;\n  ", "\n  height: 100%;\n  overflow: auto;\n\n  background: ", ";\n  ", ";\n"])), function (_a) {
    var size = _a.size, isOpenRoll = _a.isOpenRoll;
    if (isOpenRoll) {
        return size === "l" ? Padding.allSide(3, 4) : Padding.allSide(2, 5);
    }
    return size === "l" ? Padding.allSide(3, 0) : Padding.allSide(2, 0);
}, function (_a) {
    var theme = _a.theme, isOpenRoll = _a.isOpenRoll;
    return isOpenRoll && theme.components[COMPONENT_NAME].background;
}, BorderRadius.roundBorderBottom(Shape.borderRadiusMedium));
RollContentWrapper.defaultProps = {
    theme: LIGHT_THEME
};
export var FooterStyled = styled.div.attrs(function (props) { return ({
    theme: getTheme({
        theme: props.theme,
        defaultTheme: defaultThemeRoll,
        componentName: COMPONENT_NAME
    })
}); })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n  background: ", ";\n  ", ";\n  ", ";\n  ", ";\n"], ["\n  background: ", ";\n  ", ";\n  ", ";\n  ", ";\n"])), function (_a) {
    var theme = _a.theme;
    return theme.components[COMPONENT_NAME].background;
}, Padding.allSide(2, 4), function (_a) {
    var theme = _a.theme;
    return theme.shadows.sp.top;
}, BorderRadius.roundBorder(Shape.borderRadiusMedium));
FooterStyled.defaultProps = {
    theme: LIGHT_THEME
};
var templateObject_1, templateObject_2, templateObject_3;
