"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StyledButton = exports.Wrapper = exports.CollapsibleWrapper = void 0;
const Button_1 = require("../Button");
const styled_1 = require("../styled");
const Typography_1 = require("../Typography");
const collapsibleTypographyWrapperProps = [
    'rowsCount',
    'isOpenCollapse',
    'currentHeight',
];
exports.CollapsibleWrapper = styled_1.styled.article `
  display: grid;
`;
exports.Wrapper = (0, styled_1.styled)(Typography_1.Typography, {
    shouldForwardProp: (name) => !collapsibleTypographyWrapperProps.includes(name),
}) `
  /* stylelint-disable-next-line */
  overflow: hidden;
  /* stylelint-disable-next-line */
  display: ${({ isOpenCollapse }) => (isOpenCollapse ? '' : '-webkit-box')};

  max-width: 100%;
  height: ${({ currentHeight }) => currentHeight};

  text-overflow: ellipsis;
  white-space: ${({ isOpenCollapse }) => (isOpenCollapse ? 'none' : 'initial')};

  transition: ${({ theme }) => theme.transitions.create(['height'], {
    duration: theme.transitions.duration.standard,
})};

  /* stylelint-disable-next-line */
  -webkit-box-orient: ${({ isOpenCollapse }) => isOpenCollapse ? '' : 'vertical'};
  /* stylelint-disable-next-line */
  -webkit-line-clamp: ${({ rowsCount, isOpenCollapse }) => isOpenCollapse ? 'none' : rowsCount || '1'};
`;
exports.StyledButton = (0, styled_1.styled)(Button_1.Button, {
    shouldForwardProp: (prop) => !['$placement'].includes(prop),
}) `
  justify-self: ${({ $placement }) => $placement};
`;
