(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dd7b2"],{8224:function(t,o,s){"use strict";s.r(o);var i=function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("h3",[t._v("Loop")]),t.plan?s("div",{staticClass:"livechat-plan"},[s("h4",[t._v("Price")]),t.coupon?s("h5",[t._v("$ "+t._s(t.plan.price-t.coupon.amount_off)+" ( "),s("i",{staticClass:"text-danger",staticStyle:{"text-decoration":"line-through"}},[t._v(t._s(t.plan.price))]),t._v(" ) / Month")]):s("h5",[t._v("$"+t._s(t.plan.price)+" / Month")]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-12",domProps:{innerHTML:t._s(t.plan.desc)}})]),t.user.agency.is_enabled_loop?t._e():s("div",{staticClass:"row mt-4 mb-3"},[s("div",{staticClass:"col-md-6"},[s("div",{staticClass:"form-group d-flex"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.couponCode,expression:"couponCode"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Discount Code",disabled:t.coupon},domProps:{value:t.couponCode},on:{input:function(o){o.target.composing||(t.couponCode=o.target.value)}}}),t.coupon?t._e():s("button",{staticClass:"btn btn-success ml-4",staticStyle:{width:"150px"},attrs:{disabled:!t.couponCode||t.isLoadingCoupon},on:{click:t.checkCoupon}},[t._v(" Apply ")])]),t.coupon?s("strong",{staticClass:"text-primary"},[t._v("Coupon is valid")]):t._e()])]),t.user.agency.is_enabled_loop?s("h3",{staticClass:"text-primary text-left mt-4"},[t._v(" Your Subscription is Active now. ")]):s("button",{staticClass:"btn btn-primary",staticStyle:{width:"300px"},attrs:{disabled:t.isLoadingSubscription},on:{click:t.subscription}},[t.isLoadingSubscription?s("b-spinner",{attrs:{small:""}}):s("span",[t._v(" Subscribe ")])],1)]):t._e(),t.isLoadingPlan?s("div",{staticClass:"text-center"},[s("b-spinner")],1):t._e()])])},n=[],a={data(){return{isLoadingPlan:!1,plan:null,couponCode:null,isLoadingSubscription:!1,isLoadingCoupon:!1,coupon:null}},computed:{user(){return this.$store.getters["auth/user"]}},mounted(){this.getLoopPlan()},methods:{getLoopPlan(){this.isLoadingPlan=!0,this.$store.dispatch("loop/getPlan").then(t=>{this.isLoadingPlan=!1,this.plan=t}).catch(()=>{this.isLoadingPlan=!1})},subscription(){this.isLoadingSubscription=!0,this.$store.dispatch("loop/subscription",this.coupon?this.couponCode:null).then(()=>{this.isLoadingSubscription=!1}).catch(()=>{this.isLoadingSubscription=!1})},checkCoupon(){this.isLoadingCoupon=!0,this.$store.dispatch("loop/checkCoupon",this.couponCode).then(t=>{this.coupon=t,this.isLoadingCoupon=!1}).catch(()=>{this.isLoadingCoupon=!1})}}},e=a,c=s("2877"),p=Object(c["a"])(e,i,n,!1,null,null,null);o["default"]=p.exports}}]);
//# sourceMappingURL=chunk-2d0dd7b2.a088647c.js.map