(() => { const { EventManager, utils } = ShopbySkin; const { setGlobalsVariableBy, isMobileDevice } = utils; EventManager.on("PAGE_LOAD_COMPLETED", ({ profile }) => { setGlobalsVariableBy("getPlatform", () => isMobileDevice ? "MOBILE_WEB" : "PC" ); setGlobalsVariableBy("profile", profile); }); const searchParams = new URLSearchParams(location.search); const trackingKey = searchParams.get("trackingKey"); const channelType = searchParams.get("channelType"); const { setTrackingKey, setChannelType } = ShopbySkin.utils; setTrackingKey(trackingKey); setChannelType(channelType); const showHeader = () => { const header = document.querySelector(".menu"); header.style.display = "revert"; }; })(); class CustomShopbyHeader extends ShopbySkin.modules.ShopbyHeader { setEvent() { super.setEvent(); const clickEventMap = new Map(); clickEventMap.set("SEARCH", () => { this.eventManager.fire("OPEN_LAYER_MODAL", { name: "search-keyword", modalAddClass: "full-modal title-modal--full search-keyword-modal", isFull: true, }); }); this.addEvent({ eventType: "click", eventMap: clickEventMap, }); } } customElements.define("custom-shopby-header", CustomShopbyHeader); // document.getElementById("open-drawer-btn").addEventListener("click", function () { // const navDrawer = document.getElementById("menu"); // navDrawer.classList.toggle("open"); // Toggle the "open" class to show/hide the drawer // }); // document // .getElementById("close-drawer-btn") // .addEventListener("click", function () { // const navDrawer = document.getElementById("menu"); // navDrawer.classList.toggle("open"); // Toggle the "open" class to show/hide the drawer // });