"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get BeforeHeader () {
        return BeforeHeader;
    },
    get CloseButton () {
        return CloseButton;
    },
    get Footer () {
        return Footer;
    },
    get Handler () {
        return Handler;
    },
    get Header () {
        return Header;
    },
    get Panel () {
        return Panel;
    },
    get PanelContent () {
        return PanelContent;
    },
    get StyledBody () {
        return StyledBody;
    }
});
const _styled = /*#__PURE__*/ _interop_require_default(require("@emotion/styled"));
const _engines = require("../../engines");
const _IconButton = require("../IconButton");
const _IconButtontokens = require("../IconButton/IconButton.tokens");
const _BottomSheettokens = require("./BottomSheet.tokens");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const IconButton = (0, _engines.component)((0, _engines.mergeConfig)(_IconButton.iconButtonConfig));
const dividerLine = `
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    display: block;
    height: var(${_BottomSheettokens.tokens.dividerWidth});
    background-color: var(${_BottomSheettokens.tokens.dividerColor});
    opacity: 0;
    transition: opacity 0.2s ease;
`;
const Panel = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw0",
    label: "Panel"
})("position:fixed;left:0;bottom:0;width:100%;max-height:inherit;display:flex;flex-direction:column;box-sizing:border-box;border-radius:var(", _BottomSheettokens.tokens.borderRadius, ");overflow:visible;&.", _BottomSheettokens.classes.animated, "{transition:transform 0.4s ease,opacity 0.4s ease,height 0.3s ease,visibility 0.4s ease;}&.", _BottomSheettokens.classes.closed, "{transform:translateY(100%);opacity:0;visibility:hidden;}");
const PanelContent = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw1",
    label: "PanelContent"
})("display:flex;flex:1 1 auto;flex-direction:column;min-height:0;max-height:inherit;background-color:var(", _BottomSheettokens.tokens.contentBackgroundColor, ");border-radius:inherit;overflow:hidden;");
const Handler = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw2",
    label: "Handler"
})("position:absolute;z-index:1;top:", ({ $placement })=>$placement === 'outer' ? `calc(-1 * (2 * var(${_BottomSheettokens.tokens.handleGap}) + var(${_BottomSheettokens.tokens.handleHeight})))` : '0', ";left:0;right:0;display:flex;justify-content:center;box-sizing:border-box;padding:var(", _BottomSheettokens.tokens.handleGap, ") 0;touch-action:none;user-select:none;cursor:grab;&::before{content:'';display:none;width:var(", _BottomSheettokens.tokens.handleWidth, ");height:var(", _BottomSheettokens.tokens.handleHeight, ");border-radius:var(", _BottomSheettokens.tokens.handleBorderRadius, ");background-color:var(", _BottomSheettokens.tokens.handleBackgroundColor, ");}&.", _BottomSheettokens.classes.hasHandle, "::before{display:block;}");
const StyledBody = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw3",
    label: "StyledBody"
})("flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:none;&::-webkit-scrollbar{display:none;}");
const Header = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw4",
    label: "Header"
})("position:relative;flex-shrink:0;&::after{", dividerLine, "        bottom:0;}&.", _BottomSheettokens.classes.headerDividerVisible, "::after{opacity:1;}");
const Footer = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw5",
    label: "Footer"
})("position:relative;flex-shrink:0;&::before{", dividerLine, "        top:0;}&.", _BottomSheettokens.classes.footerDividerVisible, "::before{opacity:1;}");
const BeforeHeader = (0, /*#__PURE__*/ _styled.default)("div", {
    target: "etb1gnw6",
    label: "BeforeHeader"
})("flex-shrink:0;");
const CloseButton = /*#__PURE__*/ (0, _styled.default)(IconButton, {
    target: "etb1gnw7",
    label: "CloseButton"
})("position:absolute;z-index:2;top:var(", _BottomSheettokens.tokens.closeIconOffset, ");right:var(", _BottomSheettokens.tokens.closeIconOffset, ");flex-shrink:0;", _IconButtontokens.tokens.iconButtonWidth, ":var(", _BottomSheettokens.tokens.closeIconSize, ");", _IconButtontokens.tokens.iconButtonHeight, ":var(", _BottomSheettokens.tokens.closeIconSize, ");", _IconButtontokens.tokens.iconButtonRadius, ":var(", _BottomSheettokens.tokens.closeIconRadius, ");", _IconButtontokens.tokens.iconButtonColor, ":var(", _BottomSheettokens.tokens.closeIconColor, ");", _IconButtontokens.tokens.iconButtonColorHover, ":var(", _BottomSheettokens.tokens.closeIconColor, ");", _IconButtontokens.tokens.iconButtonColorActive, ":var(", _BottomSheettokens.tokens.closeIconColor, ");", _IconButtontokens.tokens.iconButtonBackgroundColor, ":var(", _BottomSheettokens.tokens.closeIconBackgroundColor, ");", _IconButtontokens.tokens.iconButtonBackgroundColorHover, ":var(", _BottomSheettokens.tokens.closeIconBackgroundColorHover, ");");
