"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BottomDrawer = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const CrossOutlineMd_1 = require("../../icons/CrossOutlineMd");
const IconButton_1 = require("../IconButton");
const constants_1 = require("./constants");
const styles_1 = require("./styles");
const BottomDrawer = ({ title, drawerHeaderHeight = constants_1.DEFAULT_HEADER_HEIGHT, children, onClose, headerContent, ...props }) => {
    const handleClose = (event) => {
        if (onClose) {
            onClose(event, 'escapeKeyDown');
        }
    };
    return ((0, jsx_runtime_1.jsxs)(styles_1.StyledDrawer, { ...props, anchor: "bottom", onClose: onClose, children: [(0, jsx_runtime_1.jsxs)(styles_1.Header, { drawerHeaderHeight: drawerHeaderHeight, className: constants_1.bottomDrawerClassnames.header, children: [(0, jsx_runtime_1.jsx)(styles_1.HeaderTitle, { variant: "h6", noWrap: true, children: title }), headerContent, (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { variant: "text", onClick: handleClose, size: "medium", children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) })] }), (0, jsx_runtime_1.jsx)(styles_1.Body, { className: constants_1.bottomDrawerClassnames.content, children: children })] }));
};
exports.BottomDrawer = BottomDrawer;
