import React from 'react';

// Replace svg file to svg tag, display icon faster

const Badge = ({ isWifiLogo, radioTech }) => {
  let logo = null;

  if ('ps' === radioTech) {
    logo = (
      // This svg tag come from ./ic_lte_badge.svg file
      <svg
        xmlns='http://www.w3.org/2000/svg'
        xmlnsXlink='http://www.w3.org/1999/xlink'
        width='32px'
        height='10px'
        viewBox='0 0 32 10'
        version='1.1'
      >
        <title>ic_lte_badge</title>
        <g
          id='ic_lte_badge'
          stroke='none'
          strokeWidth='1'
          fill='none'
          fillRule='evenodd'
        >
          <rect
            id='Rectangle'
            fill='#000000'
            x='3'
            y='0'
            width='26'
            height='10'
            rx='5'
          />
          <path
            d='M10.6506,2.0002 C11.0086,2.0002 11.2996,2.2912 11.2996,
              2.6502 L11.2996,2.6502 L11.2996,6.7002 L13.3496,6.7002 C13.7086,
              6.7002 13.9996,6.9912 13.9996,7.3502 C13.9996,7.7092 13.7086,
              8.0002 13.3496,8.0002 L13.3496,8.0002 L10.6506,
              8.0002 C10.2906,8.0002 9.9996,7.7092 9.9996,7.3502 L9.9996,
              7.3502 L9.9996,2.6502 C9.9996,2.2912 10.2906,2.0002 10.6506,
              2.0002 Z M17.3496,2 C17.7086,2 17.9996,2.291 17.9996,
              2.65 C17.9996,3.009 17.7086,3.3 17.3496,3.3 L17.3496,3.3 L16.4006,
              3.3 L16.4006,7.35 C16.4006,7.709 16.1096,8 15.7496,8 C15.3906,
              8 15.0996,7.709 15.0996,7.35 L15.0996,7.35 L15.0996,3.3 L14.1506,
              3.3 C13.7906,3.3 13.4996,3.009 13.4996,2.65 C13.4996,2.291 13.7906,
              2 14.1506,2 L14.1506,2 Z M21.8496,1.9998 C22.2086,1.9998 22.4996,
              2.2908 22.4996,2.6498 C22.4996,3.0088 22.2086,3.2998 21.8496,
              3.2998 L21.8496,3.2998 L19.7996,3.2998 L19.7996,4.3498 L21.5496,
              4.3498 C21.9096,4.3498 22.2006,4.6408 22.2006,4.9998 C22.2006,
              5.3588 21.9096,5.6498 21.5496,5.6498 L21.5496,5.6498 L19.7996,
              5.6498 L19.7996,6.6998 L21.8496,6.6998 C22.2086,6.6998 22.4996,
              6.9908 22.4996,7.3498 C22.4996,7.7088 22.2086,7.9998 21.8496,
              7.9998 L21.8496,7.9998 L19.1506,7.9998 C18.7906,7.9998 18.4996,
              7.7088 18.4996,7.3498 L18.4996,7.3498 L18.4996,2.6498 C18.4996,
              2.2908 18.7906,1.9998 19.1506,1.9998 L19.1506,1.9998 Z'
            id='Combined-Shape'
            fill='#FFFFFF'
          />
        </g>
      </svg>
    );
  }

  if ('wifi' === radioTech) {
    if (isWifiLogo) {
      logo = (
        // This svg tag come from ./ic_wifi_badge.svg file
        <svg
          xmlns='http://www.w3.org/2000/svg'
          xmlnsXlink='http://www.w3.org/1999/xlink'
          width='32px'
          height='10px'
          viewBox='0 0 32 10'
          version='1.1'
        >
          <title>ic_wifi_badge</title>
          <g
            id='ic_wifi_badge'
            stroke='none'
            strokeWidth='1'
            fill='none'
            fillRule='evenodd'
          >
            <rect
              id='Rectangle'
              fill='#000000'
              x='3'
              y='0'
              width='26'
              height='10'
              rx='5'
            />
            <path
              d='M13.8266,2.43337 C13.9226,2.11537 14.2556,1.93637 14.5746,
                2.03237 C14.8916,2.12837 15.0706,2.46337 14.9746,2.78037 L14.9746,
                2.78037 L13.5246,7.57937 C13.4486,7.83337 13.2156,8.00637 12.9506,
                8.00637 C12.6856,8.00637 12.4526,7.83337 12.3766,7.57937 L12.3766,
                7.57937 L11.5006,4.68137 L10.6246,7.57937 C10.4716,8.08637 9.6286,
                8.08637 9.4756,7.57937 L9.4756,7.57937 L8.0256,2.78037 C7.9296,
                2.46337 8.1086,2.12837 8.4266,2.03237 C8.7456,1.93637 9.0786,
                2.11537 9.1746,2.43337 L9.1746,2.43337 L10.0506,5.33137 L10.9266,
                2.43337 C11.0786,1.92637 11.9226,1.92637 12.0746,2.43337 L12.0746,
                2.43337 L12.9506,5.33137 Z M21.349,2.00407 C21.708,2.00407 21.999,
                2.29507 21.999,2.65407 C21.999,3.01307 21.708,3.30407 21.349,
                3.30407 L21.349,3.30407 L19.296,3.30407 L19.296,4.35407 L21.049,
                4.35407 C21.408,4.35407 21.699,4.64507 21.699,5.00407 C21.699,
                5.36307 21.408,5.65407 21.049,5.65407 L21.049,5.65407 L19.296,
                5.65407 L19.296,7.35407 C19.296,7.71307 19.005,8.00407 18.647,
                8.00407 C18.287,8.00407 17.996,7.71307 17.996,7.35407 L17.996,
                7.35407 L17.996,2.65407 C17.996,2.29507 18.287,2.00407 18.647,
                2.00407 L18.647,2.00407 Z M23.35,4.00107 C23.709,4.00107 24,
                4.29207 24,4.65107 L24,4.65107 L24,7.35407 C24,7.71307 23.709,
                8.00407 23.35,8.00407 C22.992,8.00407 22.701,7.71307 22.701,
                7.35407 L22.701,7.35407 L22.701,4.65107 C22.701,4.29207 22.992,
                4.00107 23.35,4.00107 Z M16.35,4.00107 C16.709,4.00107 17,4.29207 17,
                4.65107 L17,4.65107 L17,7.35407 C17,7.71307 16.709,8.00407 16.35,
                8.00407 C15.992,8.00407 15.701,7.71307 15.701,7.35407 L15.701,
                7.35407 L15.701,4.65107 C15.701,4.29207 15.992,4.00107 16.35,
                4.00107 Z M23.3496,2.00007 C23.7096,2.00007 24.0006,2.29107 24.0006,
                2.65007 C24.0006,3.00907 23.7096,3.30007 23.3496,3.30007 C22.9916,
                3.30007 22.7006,3.00907 22.7006,2.65007 C22.7006,2.29107 22.9916,
                2.00007 23.3496,2.00007 Z M16.35,2.00017 C16.709,2.00017 17,
                2.29117 17,2.65017 C17,3.00917 16.709,3.30017 16.35,3.30017 C15.992,
                3.30017 15.701,3.00917 15.701,2.65017 C15.701,2.29117 15.992,
                2.00017 16.35,2.00017 Z'
              id='Combined-Shape'
              fill='#FFFFFF'
            />
          </g>
        </svg>
      );
    } else {
      logo = (
        // This svg tag come from ./ic_wlan_badge.svg file
        <svg
          xmlns='http://www.w3.org/2000/svg'
          xmlnsXlink='http://www.w3.org/1999/xlink'
          width='32px'
          height='10px'
          viewBox='0 0 32 10'
          version='1.1'
        >
          <title>ic_wlan_badge</title>
          <g
            id='ic_wlan_badge'
            stroke='none'
            strokeWidth='1'
            fill='none'
            fillRule='evenodd'
          >
            <rect
              id='Rectangle'
              fill='#000000'
              x='3'
              y='0'
              width='26'
              height='10'
              rx='5'
            />
            <g
              id='Group-9'
              transform='translate(8.000000, 2.000000)'
              fill='#FFFFFF'
            >
              <path
                d='M2.5502,0.00014 C2.8612,0.00014 3.1282,0.22114 3.1872,
                  0.52614 L3.1872,0.52614 L3.49287578,2.08611372 L3.8132,
                  0.52114 C3.87865455,0.20114 4.16642314,-0.0122484298 4.4841692,
                  0.00268770849 L4.5802,0.01414 C4.9322,0.08514 5.1592,
                  0.42914 5.0872,0.78114 L5.0872,0.78114 L4.1172,5.53114 C4.0552,
                  5.83314 3.7882,6.05114 3.4802,6.05114 L3.4802,6.05114 C3.1672,
                  6.04914 2.9022,5.82914 2.8422,5.52614 L2.8422,5.52614 L2.5502,
                  4.03414 L2.2582,5.52614 C2.1992,5.82914 1.9332,6.04914 1.6222,
                  6.05114 L1.6222,6.05114 C1.3112,6.05114 1.0452,5.83314 0.9832,
                  5.53114 L0.9832,5.53114 L0.0132,0.78114 C-0.0588,0.42914 0.1682,
                  0.08514 0.5202,0.01414 C0.8712,-0.05386 1.2152,0.16914 1.2872,
                  0.52114 L1.2872,0.52114 L1.6062,2.08614 L1.9122,0.52614 C1.9722,
                  0.22114 2.2392,0.00014 2.5502,0.00014 Z M15.3502,0.00044 C15.7092,
                  0.00044 16.0002,0.29144 16.0002,0.65044 L16.0002,0.65044 L16.0002,
                  5.40044 C16.0002,5.70144 15.7932,5.96344 15.5012,6.03244 C15.4512,
                  6.04544 15.4002,6.05144 15.3502,6.05144 C15.1092,6.05144 14.8822,
                  5.91644 14.7702,5.69344 L14.7702,5.69344 L13.6002,3.37844 L13.6002,
                  5.40044 C13.6002,5.76044 13.3092,6.05144 12.9502,6.05144 C12.5912,
                  6.05144 12.3002,5.76044 12.3002,5.40044 L12.3002,5.40044 L12.3002,
                  0.65044 C12.3002,0.35044 12.5072,0.08844 12.7992,0.01944 C13.0932,
                  -0.05456 13.3952,0.08944 13.5302,0.35744 L13.5302,0.35744 L14.7002,
                  2.67344 L14.7002,0.65044 C14.7002,0.29144 14.9912,0.00044 15.3502,
                  0.00044 Z M6.0184,0.00084 C6.3774,0.00084 6.6684,0.29184 6.6684,
                  0.64984 L6.6684,0.64984 L6.6754,4.75084 L7.9244,4.75084 L9.0654,
                  0.48284 C9.1414,0.19884 9.3994,0.00084 9.6934,0.00084 L9.6934,
                  0.00084 L10.3064,0.00084 C10.6014,0.00084 10.8584,0.19884 10.9344,
                  0.48284 L10.9344,0.48284 L12.2044,5.23284 C12.2974,5.57984 12.0904,
                  5.93584 11.7444,6.02884 C11.6884,6.04384 11.6314,6.05084 11.5754,
                  6.05084 C11.2884,6.05084 11.0264,5.85884 10.9484,5.56884 L10.9484,
                  5.56884 L10.8034,5.02584 L9.1964,5.02584 L9.0514,5.56884 L9.0514,
                  5.56884 L9.0314,5.60884 C9.0164,5.65284 8.9954,5.69084 8.9714,
                  5.73084 C8.9514,5.76284 8.9334,5.79684 8.9074,5.82484 C8.8774,
                  5.85984 8.8414,5.88584 8.8044,5.91384 C8.7754,5.93484 8.7484,
                  5.95784 8.7154,5.97384 C8.6754,5.99484 8.6314,6.00584 8.5874,
                  6.01784 C8.5484,6.02884 8.5124,6.03884 8.4724,6.04184 C8.4554,
                  6.04284 8.4414,6.05084 8.4234,6.05084 L8.4234,6.05084 L6.0264,
                  6.05084 C5.6684,6.05084 5.3774,5.75984 5.3764,5.40184 L5.3764,
                  5.40184 L5.3684,0.65184 C5.3684,0.29284 5.6584,0.00184 6.0174,
                  0.00084 L6.0174,0.00084 Z M10.0004,2.02084 L9.4644,4.02584 L10.5354,
                  4.02584 L10.0004,2.02084 Z'
                id='Combined-Shape'
              />
            </g>
          </g>
        </svg>
      );
    }
  }

  return logo;
};

export default Badge;
