import{o as e}from"./chunk-mlkTr37E.js";import{t}from"./_plugin-vue2_normalizer-BHc2Ljhs.js";import{t as n}from"./iview-Ckd7L-Pt.js";import{n as r,r as i}from"./vuex.esm-DZpGMn32.js";import{t as a}from"./Popup-K94BXgsL.js";var o=e(n()),s=t({name:`ShopeeAffialite`,data(){return{shorLink:{url:``,result:``}}},methods:{...r([`ShopeeGetShortLink`]),async handlerSortLink(){this.shorLink.url&&(this.shorLink.result=``,this.shorLink.result=await this.ShopeeGetShortLink(this.shorLink.url),this.shorLink.result?this.$Message.success(this.$t(`SHOPEE_AFFILIATE_SHORT_LINK_FINISH`)):this.$Message.error(this.$t(`SHOPEE_AFFILIATE_SHORT_LINK_ERROR`)))},copyShortLink(){this.shorLink.result&&this.$copyText(this.shorLink.result).then(()=>{this.$Message.info([this.$t(`SHOPEE_AFFILIATE_SHORT_COPIED`),this.shorLink.result].join(` > `))})},async init(){await this.AppInitUrl();let e=this.getUrlCurrent;e.includes(this.configAppApi.shopee.home)&&(this.shorLink.url=e,this.handlerSortLink())}},created(){this.isValid&&this.init()},computed:{isValid(){return!!(this.getAffiliateShopee.id&&this.getAffiliateShopee.token)},...i([`getAffiliateShopee`])}},function(){var e=this,t=e._self._c;return t(`div`,[e.isValid?t(`div`,[t(`Form`,[t(`Row`,{attrs:{gutter:10}},[t(`Col`,{attrs:{span:16}},[t(`FormItem`,{attrs:{label:e.$t(`SHOPEE_AFFILIATE_SHORT_LINK_URL`)}},[t(`Input`,{on:{"on-change":e.handlerSortLink},model:{value:e.shorLink.url,callback:function(t){e.$set(e.shorLink,`url`,t)},expression:`shorLink.url`}})],1)],1),t(`Col`,{attrs:{span:8}},[t(`FormItem`,{attrs:{label:e.$t(`SHOPEE_AFFILIATE_SHORT_LINK_RESULT`)}},[t(`Input`,{attrs:{readonly:``},nativeOn:{click:function(t){return e.copyShortLink.apply(null,arguments)}},model:{value:e.shorLink.result,callback:function(t){e.$set(e.shorLink,`result`,t)},expression:`shorLink.result`}})],1)],1)],1)],1)],1):t(`div`,[t(`Alert`,{staticClass:`hand-hover`,attrs:{type:`warning`},nativeOn:{click:function(t){return e.RouterTo(`setting`)}}},[e._v(` `+e._s(e.$t(`SHOPEE_AFFILIATE_INVALID`))+` `)])],1)])},[],!1,null,null,null,null).exports,c=t({name:`ShopManagerWidget`,data(){return{logoUrl:`https://cms.autoshopee.com/uploads/shop_manager_logo_0928c6e4ff.png`,title:`Shop Manager (Shopee Lazada Tiktok) | chỉ 250k/tháng tặng kèm AutoShopee Kit`,subtitle:`Phần mềm quản lý đơn hàng và tin nhắn nhiều shop cùng một lúc cài đặt trên máy tính`,openUrl:`https://manager.autoshopee.com`}}},function(){var e=this,t=e._self._c;return t(`Card`,[t(`div`,{staticClass:`wg-shop-manager`,on:{click:function(t){return e.openExternalUrl(e.openUrl)}}},[t(`div`,{staticClass:`wg-shop-manager__logo`},[t(`img`,{staticClass:`wg-shop-manager__image`,attrs:{src:e.logoUrl}})]),t(`div`,{staticClass:`wg-shop-manager__body`},[t(`h4`,{staticClass:`wg-shop-manager__title`},[e._v(` `+e._s(e.title)+` `)]),t(`div`,{staticClass:`wg-shop-manager__subtitle`},[e._v(` `+e._s(e.subtitle)+` `)])])])])},[],!1,null,`26cdac3b`,null,null).exports,l=t({name:`ShopeePage`,components:{"shopee-affiliate":s,"shopee-shop":a,"widget-shop-manager":c,TabPane:o.TabPane},data(){return{tabActive:`shopee-shop`}},created(){this.ShopeeSellerInit().catch(()=>{})}},function(){var e=this,t=e._self._c;return t(`div`,[t(`div`,[e.getUseShopManager?e._e():t(`div`,{staticClass:`mb-10`},[t(`widget-shop-manager`)],1),t(`Alert`,{attrs:{type:`warning`,"show-icon":``}},[e._v(` `+e._s(e.$t(`SHOPEE_REQUIRE_PRODUCT_LINK`))+` `)]),t(`div`,[t(`shopee-shop`)],1),e._e()],1)])},[],!1,null,null,null,null).exports,u=t({name:`ShopeePage`,components:{"shopee-all":l}},function(){var e=this,t=e._self._c;return t(`div`,[e.isUsePopup?t(`layout-box`,[t(`shopee-all`)],1):t(`shopee-all`)],1)},[],!1,null,null,null,null).exports;export{u as default};