"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var themed_components_1 = __importStar(require("@monstrosity/utilities/themed-components"));
var scrollable_1 = require("../../primitives/Scrollable/scrollable");
exports.StyledPanel = themed_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  width: 100%;\n  min-height: 1rem;\n  max-height: 80vh;\n"], ["\n  width: 100%;\n  min-height: 1rem;\n  max-height: 80vh;\n"])));
exports.PanelRootStyle = themed_components_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  box-shadow: 0.25rem 0.25rem 0.5rem ", ";\n  border-radius: 0.25rem;\n  background-color: ", ";\n  border: 1px solid ", "; \n  padding: 1rem;\n"], ["\n  box-shadow: 0.25rem 0.25rem 0.5rem ", ";\n  border-radius: 0.25rem;\n  background-color: ", ";\n  border: 1px solid ", "; \n  padding: 1rem;\n"])), function (_a) {
    var theme = _a.theme;
    return theme.style.colour.shadow;
}, function (_a) {
    var theme = _a.theme;
    return theme.style.colour.background;
}, function (_a) {
    var theme = _a.theme;
    return theme.style.colour.disabled.light;
});
var SoftPanelStyle = themed_components_1.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\tborder: 1px solid rgba(0,0,0,0.156863);\n\tborder-radius: 0.375rem;\n\ttransition: all 300ms;\n\tbox-shadow: rgba(0, 0, 0, 0.0784314) 0px 0px 2px 0px, rgba(0, 0, 0, 0.05) 0px 8px 32px 0px;\n\n\t&:hover {\n\t\tbox-shadow: rgba(0, 0, 0, 0.0784314) 0px 0px 40px 0px, rgba(0, 0, 0, 0.156863) 0px 8px 32px 0px;\n\t}\n"], ["\n\tborder: 1px solid rgba(0,0,0,0.156863);\n\tborder-radius: 0.375rem;\n\ttransition: all 300ms;\n\tbox-shadow: rgba(0, 0, 0, 0.0784314) 0px 0px 2px 0px, rgba(0, 0, 0, 0.05) 0px 8px 32px 0px;\n\n\t&:hover {\n\t\tbox-shadow: rgba(0, 0, 0, 0.0784314) 0px 0px 40px 0px, rgba(0, 0, 0, 0.156863) 0px 8px 32px 0px;\n\t}\n"])));
exports.Panel = function (_a) {
    var children = _a.children, ariaLabel = _a.ariaLabel, styleOverride = _a.styleOverride, enableScrollOnBody = _a.enableScrollOnBody, isSoftStyle = _a.isSoftStyle;
    return (react_1.default.createElement(scrollable_1.Scrollable, { enableScrollOnBody: enableScrollOnBody, styles: isSoftStyle ? SoftPanelStyle : (styleOverride || exports.PanelRootStyle), invertScroll: true, scrollY: true },
        react_1.default.createElement(exports.StyledPanel, null, children)));
};
var templateObject_1, templateObject_2, templateObject_3;
