(function() {
  var SRC = (typeof window !== 'undefined' && window.CB_BRAND_LOGO)
    ? window.CB_BRAND_LOGO
    : 'assets/brand/logo.png';

  /**
   * Consistent CityBuildRR logo + optional wordmark.
   * sizes: xs | sm | md | lg | xl | hero
   */
  function BrandLogo(props) {
    props = props || {};
    var size = props.size || 'md';
    var showWordmark = props.wordmark !== false;
    var stack = !!props.stack;
    var className = props.className || '';
    var alt = props.alt != null ? props.alt : (showWordmark ? '' : 'CityBuildRR');
    var classes = [
      'cb-brand',
      'cb-brand--' + size,
      showWordmark ? '' : 'cb-brand--logo-only',
      stack ? 'cb-brand--stack' : '',
      className,
    ].filter(Boolean).join(' ');

    return React.createElement('span', {
      className: classes,
      role: showWordmark ? 'group' : undefined,
      'aria-label': showWordmark ? 'CityBuildRR' : undefined,
    },
      React.createElement('img', {
        className: 'cb-logo',
        src: SRC,
        alt: alt,
        width: 636,
        height: 694,
        decoding: 'async',
        draggable: false,
      }),
      showWordmark
        ? React.createElement('span', { className: 'cb-brand-wordmark', 'aria-hidden': alt === '' ? undefined : true }, 'CityBuildRR')
        : null
    );
  }

  window.BrandLogo = BrandLogo;
  window.CB_BRAND_LOGO = SRC;
})();
