function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

import Fishx from '@fishx/core';
import { Input } from '@whalecloud/fdx';
import umobileImg from '@whalecloud/magic-box-themes/assets/um/imgs/umobile.png';
import React, { useState } from 'react';
import './index.less';

var UmHeader = function UmHeader() {
  var _useState = useState(false),
      _useState2 = _slicedToArray(_useState, 2),
      showSearch = _useState2[0],
      setShowSearch = _useState2[1]; // const siteHeaderClass = classnames({
  //   'site-header': true,
  //   'search-is-shown': showSearch,
  // });


  return /*#__PURE__*/React.createElement("div", {
    className: "umHeaderBox"
  }, /*#__PURE__*/React.createElement("div", {
    className: "site-header",
    id: "siteHeader"
  }, /*#__PURE__*/React.createElement("div", {
    className: "site-header-main",
    id: "siteHeaderMain"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    className: "site-header-mobile-button   site-header-mobile-closer"
  }, /*#__PURE__*/React.createElement("i", {
    className: "menu-icon is-active"
  }, /*#__PURE__*/React.createElement("span", {
    className: "menu-icon-bar"
  }), /*#__PURE__*/React.createElement("span", {
    className: "menu-icon-bar"
  }), /*#__PURE__*/React.createElement("span", {
    className: "menu-icon-bar"
  }))), /*#__PURE__*/React.createElement("div", {
    className: "wrapper site-header-main-wrapper"
  }, /*#__PURE__*/React.createElement("a", {
    href: "#!",
    onClick: function onClick() {
      Fishx.history.push('/');
    },
    className: "site-header-logo"
  }, /*#__PURE__*/React.createElement("img", {
    src: umobileImg,
    alt: "U Mobile",
    className: "site-header-logo-img"
  })), /*#__PURE__*/React.createElement("nav", {
    className: "site-header-small-nav"
  }, /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/",
    className: "nav-link  current"
  }, "Personal"), /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/business",
    className: "nav-link "
  }, "Business"), /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/about-us/our-company/about-umobile",
    className: "nav-link "
  }, "About Us"), /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "Search",
    className: "site-search-toggle",
    id: "siteSearchMobileToggle"
  })), /*#__PURE__*/React.createElement("nav", {
    className: "site-header-side-nav"
  }, /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/store-finder",
    className: "nav-link"
  }, /*#__PURE__*/React.createElement("i", {
    className: "icon-font icon-font--pin"
  }), "Store Finder"), /*#__PURE__*/React.createElement("a", {
    href: "https://um-store.hexainitiative.com/reload/",
    className: "nav-link"
  }, /*#__PURE__*/React.createElement("i", {
    className: "icon-font icon-font--top-up"
  }), "Top Up"), /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/support/switch-to-u/postpaid",
    className: "nav-link"
  }, /*#__PURE__*/React.createElement("i", {
    className: "icon-font icon-font--refresh"
  }), "Switch To U"), /*#__PURE__*/React.createElement("a", {
    href: "https://wwwstg.u.com.my/online-bill-payment",
    className: "nav-link"
  }, /*#__PURE__*/React.createElement("i", {
    className: "icon-font icon-font--bill"
  }), "Pay Bill"), /*#__PURE__*/React.createElement("a", {
    href: "https://www.u.com.my/selfcare/login",
    className: "nav-link   selfcare-nav-link"
  }, /*#__PURE__*/React.createElement("i", {
    className: "icon-font icon-font--lock-open"
  }), "Self Care Login")), /*#__PURE__*/React.createElement("nav", {
    className: "site-header-main-nav",
    id: "siteMainNav"
  }, /*#__PURE__*/React.createElement("div", {
    className: "site-header-main-nav-scroller"
  }, /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink" // onClick={() => {
    //   onMenuClick(1);
    // }}

  }, "Buy Now")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Devices")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Plans")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Rewards")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Extras")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Support")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "Coverage Map")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "",
    className: "nav-link nolink"
  }, "5G for U")), /*#__PURE__*/React.createElement("div", {
    className: "nav-link-hdr nav-link-hdr--search"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "Search",
    className: "site-search-toggle",
    onClick: function onClick() {
      setShowSearch(true);
    }
  }))), showSearch && /*#__PURE__*/React.createElement("form", {
    className: "site-header-search gss"
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    title: "Hide search",
    className: "site-header-search-closer",
    id: "siteHeaderSearchCloser",
    onClick: function onClick() {
      setShowSearch(false);
    }
  }), /*#__PURE__*/React.createElement(Input, {
    placeholder: "Search...",
    style: {
      borderWidth: '0px'
    },
    className: "site-header-search-field"
  })))))));
};

export default UmHeader;