"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledIconButton = exports.StyledBottomSheet = exports.Backdrop = void 0;
var _designTokens = require("@nordnet/design-tokens");
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = require("../..");
var _constants = require("./constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getNeutralColor = function getNeutralColor(colorToken, theme, invertedColors) {
  if (invertedColors) {
    return theme.isDarkMode ? _designTokens.lightTheme.color.neutral[colorToken] : _designTokens.darkTheme.color.neutral[colorToken];
  }
  return theme.colorTokens.neutral[colorToken];
};
var getActionColor = function getActionColor(colorToken, theme, invertedColors) {
  if (invertedColors) {
    return theme.isDarkMode ? _designTokens.lightTheme.color.action[colorToken] : _designTokens.darkTheme.color.action[colorToken];
  }
  return theme.colorTokens.action[colorToken];
};
var StyledIconButton = exports.StyledIconButton = (0, _styledComponents.default)(_.Button.Icon).withConfig({
  displayName: "BottomSheetstyles__StyledIconButton",
  componentId: "sc-ka5sdk-0"
})(["background-color:", ";color:", ";svg{color:", ";}&:hover{background-color:", ";svg{color:", ";}}&:active{background-color:", ";svg{color:", ";}}"], function (p) {
  return getNeutralColor('background_strong', p.theme, p.$invertedColors);
}, function (p) {
  return getNeutralColor('icon_default', p.theme, p.$invertedColors);
}, function (p) {
  return getNeutralColor('icon_default', p.theme, p.$invertedColors);
}, function (p) {
  return getNeutralColor('background_strong', p.theme, p.$invertedColors);
}, function (p) {
  return getActionColor('icon_hover', p.theme, p.$invertedColors);
}, function (p) {
  return getNeutralColor('background_weak', p.theme, p.$invertedColors);
}, function (p) {
  return getActionColor('icon_pressed', p.theme, p.$invertedColors);
});
var Backdrop = exports.Backdrop = (0, _styledComponents.default)(_.Flexbox).withConfig({
  displayName: "BottomSheetstyles__Backdrop",
  componentId: "sc-ka5sdk-1"
})(["background-color:", ";height:100%;left:0;position:fixed;top:0;width:100%;z-index:", ";"], function (_ref) {
  var theme = _ref.theme;
  return theme.colorTokens.neutral.background_overlay;
}, function (_ref2) {
  var theme = _ref2.theme;
  return theme.zIndex.overlay;
});
var getHeight = function getHeight(height, fullScreenMobile) {
  if (fullScreenMobile) {
    return 'height: 100%';
  }
  if (height && typeof height === 'number') {
    return "height: ".concat(height, "px");
  }
  if (height && typeof height === 'string') {
    return "height: ".concat(height);
  }
  return '';
};
var StyledBottomSheet = exports.StyledBottomSheet = (0, _styledComponents.default)(_.Flexbox).withConfig({
  displayName: "BottomSheetstyles__StyledBottomSheet",
  componentId: "sc-ka5sdk-2"
})(["background-color:", ";border-color:", ";border-radius:", ";bottom:0;box-sizing:border-box;color:", ";display:block;", ";transition:height ", "s ease-out;left:0;padding:", "px ", "px;position:absolute;width:100%;z-index:", ";"], function (p) {
  return getNeutralColor('background_default', p.theme, p.$invertedColors);
}, function (p) {
  return getNeutralColor('background_default', p.theme, p.$invertedColors);
}, function (_ref3) {
  var theme = _ref3.theme;
  return "".concat(theme.borderRadius20, " ").concat(theme.borderRadius20, " 0 0");
}, function (p) {
  return getNeutralColor('text_default', p.theme, p.$invertedColors);
}, function (p) {
  return getHeight(p.height, p.$fullScreenMobile);
}, _constants.TRANSITION_DURATION, function (p) {
  return p.theme.spacing.unit(4);
}, function (p) {
  return p.theme.spacing.unit(3);
}, function (p) {
  return p.theme.zIndex.overlayInModal;
});