'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var clsx = require('clsx');
var logoAssets$1 = require('./logo-assets.js');
require('../common/theme.js');
require('../common/direction.js');
var neptuneTokens = require('@transferwise/neptune-tokens');
require('../common/propsValues/control.js');
require('../common/propsValues/size.js');
require('../common/propsValues/typography.js');
require('../common/propsValues/width.js');
require('../common/propsValues/type.js');
require('../common/propsValues/dateMode.js');
require('../common/propsValues/monthFormat.js');
require('../common/propsValues/position.js');
require('../common/propsValues/layouts.js');
require('../common/propsValues/status.js');
require('../common/propsValues/sentiment.js');
require('../common/propsValues/profileType.js');
require('../common/propsValues/variant.js');
require('../common/propsValues/scroll.js');
require('../common/propsValues/markdownNodeType.js');
require('../common/fileType.js');
require('@transferwise/formatting');
require('@transferwise/icons');
require('react');
require('react-intl');
require('../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
var useScreenSize = require('../common/hooks/useScreenSize.js');

exports.LogoType = void 0;
(function (LogoType) {
  LogoType["WISE"] = "WISE";
  LogoType["WISE_BUSINESS"] = "WISE_BUSINESS";
  LogoType["WISE_PLATFORM"] = "WISE_PLATFORM";
})(exports.LogoType || (exports.LogoType = {}));
exports.LogoDisplay = void 0;
(function (LogoDisplay) {
  LogoDisplay["RESPONSIVE"] = "responsive";
  LogoDisplay["COMPACT"] = "compact";
  LogoDisplay["FULL"] = "full";
})(exports.LogoDisplay || (exports.LogoDisplay = {}));
exports.LogoFormat = void 0;
(function (LogoFormat) {
  LogoFormat["DEFAULT"] = "default";
  LogoFormat["PRIMARY_LOCKUP"] = "primary-lockup";
  LogoFormat["SECONDARY_LOCKUP"] = "secondary-lockup";
})(exports.LogoFormat || (exports.LogoFormat = {}));
const labelByType = {
  WISE: 'Wise',
  WISE_BUSINESS: 'Wise Business',
  WISE_PLATFORM: 'Wise Platform'
};
const logoAssets = {
  FastFlag: logoAssets$1.FastFlag,
  WiseLogo: logoAssets$1.WiseLogo,
  WiseBusinessPrimary: logoAssets$1.WiseBusinessPrimary,
  WiseBusinessSecondary: logoAssets$1.WiseBusinessSecondary,
  WisePlatformPrimary: logoAssets$1.WisePlatformPrimary,
  WisePlatformSecondary: logoAssets$1.WisePlatformSecondary
};
/**
 * Renders the Wise wordmark logo. Responsive — shows the flag-only mark on small viewports
 * and the full wordmark on ≥600px (small breakpoint and above).
 *
 * @see {@link https://docs.wise.design/foundations/logo Design Spec}
 */
function Logo({
  className,
  type = 'WISE',
  format = 'default',
  display = 'responsive',
  size = 24,
  'aria-label': ariaLabel
}) {
  const isScreenSm = !useScreenSize.useScreenSize(neptuneTokens.Breakpoint.SMALL);
  const compact = display === 'compact' || display === 'responsive' && isScreenSm;
  const assetName = compact ? 'FastFlag' : getAssetName(type, format);
  const Asset = logoAssets[assetName];
  const sizes = logoAssets$1.logoAssetsDimensions[assetName];
  const {
    width,
    height
  } = logoAssets$1.logoAssetsDimensions[assetName][Number(size)] ?? sizes[24];
  return /*#__PURE__*/jsxRuntime.jsx("span", {
    className: clsx.clsx('np-logo', className),
    role: "img",
    "aria-label": ariaLabel ?? labelByType[type],
    style: {
      '--wds-logo-width': `${width}px`,
      '--wds-logo-height': `${height}px`
    },
    children: /*#__PURE__*/jsxRuntime.jsx(Asset, {})
  });
}
function getAssetName(type, format) {
  if (format !== 'default') {
    if (type === 'WISE_BUSINESS') {
      return format === 'secondary-lockup' ? 'WiseBusinessSecondary' : 'WiseBusinessPrimary';
    }
    if (type === 'WISE_PLATFORM') {
      return format === 'secondary-lockup' ? 'WisePlatformSecondary' : 'WisePlatformPrimary';
    }
  }
  return 'WiseLogo';
}

exports.default = Logo;
//# sourceMappingURL=Logo.js.map
