"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StyledBottomDrawer = exports.StyledDrawer = void 0;
const DialogContent_1 = require("@mui/material/DialogContent");
const DialogTitle_1 = require("@mui/material/DialogTitle");
const Drawer_1 = __importStar(require("@mui/material/Drawer"));
const BottomDrawer_1 = require("../BottomDrawer");
const constants_1 = require("../SideDialogHeader/constants");
const styled_1 = require("../styled");
const constants_2 = require("./constants");
const getSize = (size) => {
    return constants_2.SIZES[size] || constants_2.SIZES.sm;
};
exports.StyledDrawer = (0, styled_1.styled)(Drawer_1.default, {
    shouldForwardProp: (prop) => !['$size'].includes(prop),
}) `
  height: 100vh;

  /* Причина игнора: Прогрессивное улучшение */
  /* stylelint-disable plugin/no-unsupported-browser-features */
  @supports (height: 100dvh) {
    height: 100dvh;
  }
  /* stylelint-enable plugin/no-unsupported-browser-features */

  .${Drawer_1.drawerClasses.paper} {
    width: ${({ $size }) => getSize($size)};
    height: calc(100% - ${constants_2.SIDE_DIALOG_SCREEN_OFFSET});
    margin: ${({ theme }) => theme.spacing(4)};

    border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
    box-shadow: 0 12px 24px 0 #00000038;
  }

  & .${DialogTitle_1.dialogTitleClasses.root} + .${DialogContent_1.dialogContentClasses.root} {
    padding-top: ${({ theme }) => theme.spacing(4)};
  }
`;
exports.StyledBottomDrawer = (0, styled_1.styled)(BottomDrawer_1.BottomDrawer) `
  ${({ theme }) => theme.breakpoints.down('sm')} {
    /* Причина игнора: Не критично для отображения */
    /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
    &:has(.${constants_1.sideDialogHeaderClassnames.root}) {
      & .${BottomDrawer_1.bottomDrawerClassnames.header} {
        display: none;
      }
    }
  }
`;
