/*! 2024. 7. 2. 오전 10:10:06 */ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; (async () => { const { EventManager, pageHelper, utils } = ShopbySkin; const myCouponListHelper = pageHelper.myCouponListHelper(); const searchParams = new URLSearchParams(location.search); const params = Object.fromEntries(searchParams.entries()); myCouponListHelper.initialize({ ...params, tab: params.usable === 'false' ? 'UNISSUABLE' : 'ISSUABLE', }); // [Aaron] 쿠폰리스트 Content SDK 데이터 전송 if (utils.isSignIn()) { const oneScanData = getOneScanData(); const vipId = await getVipId(); const params = { contentName: 'Coupon_List', vipId, ...oneScanData, }; await sendCommonContentSdk(params); } // END const moduleActionHandler = { REGISTER: () => { EventManager.fire('OPEN_LAYER_MODAL', { name: 'coupon-register-form', title: '쿠폰 등록', modalAddClass: 'coupon-registration-modal', isFull: false, onClose: ({ reason }) => { if (reason === 'DID_SUBMIT') { EventManager.fire('MODAL_ALERT_OPEN', { noticeType: 'SUCCESS', message: '쿠폰이 등록이 완료되었습니다.', onClose: () => { location.reload(); }, }); } }, }); }, }; document .querySelector('coupon-total-count') ?.addEventListener('click', ({ target }) => { const action = target.getAttribute('shopby-action'); moduleActionHandler[action]?.(); }); document.querySelector('coupon-list')?.addEventListener('click', ({ target }) => { const actionTarget = target.getAttribute('shopby-action'); if (!actionTarget) { return; } moduleActionHandler[actionTarget](target); }); })(); /******/ })();