"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SideDialog = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const SideDialogTitle_1 = require("../SideDialogTitle");
const useViewportType_1 = require("../useViewportType");
const styles_1 = require("./styles");
const SideDialog = ({ children, title, onClose, open, size = 'sm', ...props }) => {
    const { isMobile } = (0, useViewportType_1.useViewportType)();
    if (isMobile) {
        return ((0, jsx_runtime_1.jsx)(styles_1.StyledBottomDrawer, { onClose: onClose, title: title, open: open, ...props, children: children }));
    }
    return ((0, jsx_runtime_1.jsxs)(styles_1.StyledDrawer, { "$size": size, anchor: "right", open: open, onClose: onClose, ...props, children: [title && (0, jsx_runtime_1.jsx)(SideDialogTitle_1.SideDialogTitle, { onClose: onClose, children: title }), children] }));
};
exports.SideDialog = SideDialog;
