"use strict";(self["webpackChunkcarabi_x2"]=self["webpackChunkcarabi_x2"]||[]).push([[4525],{5818:function(e,t,a){a.r(t),a.d(t,{default:function(){return n}});var o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"pos-card"},[e.header?t("div",{staticClass:"pos-card-header",class:{"pos-bgr-default":e.headerBgrDefault,"pos-header-large":e.headerLarge,"pos-header-small":e.headerSmall,"pos-header-padding-none":e.headerPaddingNone}},[e.headerLeft?t("div",{staticClass:"pos-card-header-item"},[e._t("headerLeft")],2):e._e(),t("div",{staticClass:"pos-card-header--content"},[e._t("header")],2),e.headerRight?t("div",{staticClass:"pos-card-header-item"},[e._t("headerRight")],2):e._e(),e.bodyRightToggleShow?t("a",{staticClass:"pos-card-header-item link",class:{"uk-text-danger":e.bodyRightShow},on:{click:function(t){return t.preventDefault(),e.bodyRightToggle.apply(null,arguments)}}},[t("img",{attrs:{src:"/img/icons/icon__info.svg","uk-svg":"",width:"20",height:"20"}})]):e._e()]):e._e(),t("div",{staticClass:"pos-card-body"},[t("div",{ref:"body",staticClass:"pos-card-body-middle",class:{"pos-padding":e.bodyPadding}},[e._t("body")],2),t("transition",{attrs:{name:"slide-left"}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.bodyLeft&&e.leftToggleState,expression:"bodyLeft && leftToggleState"}],ref:"bodyLeft",staticClass:"pos-card-body-left",class:{"pos-padding":e.bodyLeftPadding}},[e._t("bodyLeft")],2)])],1),e.footer?t("div",{staticClass:"pos-card-footer",class:{"pos-bgr-default":e.headerBgrDefault,"pos-header-large":e.headerLarge,"pos-header-small":e.headerSmall,"pos-header-padding-none":e.headerPaddingNone}},[e.footerLeft?t("div",{staticClass:"pos-card-header-item"},[e._t("footerLeft")],2):e._e(),t("div",{staticClass:"pos-card-header--content"},[e._t("footer")],2),e.footerRight?t("div",{staticClass:"pos-card-header-item"},[e._t("footerRight")],2):e._e()]):e._e(),t("transition",{attrs:{name:"slide-right"}},[e.bodyRightShow?t("div",{staticClass:"pos-card-body-right",class:{large:e.rightPanelSize}},[e._t("bodyRight")],2):e._e()]),t("transition",{attrs:{name:"fade"}},["loading"===e.loader?t("div",{staticClass:"pos-card-loader"},[t("div",[t("Loader",{attrs:{width:40,height:40}}),t("div",{staticClass:"uk-margin-small-top",domProps:{textContent:e._s(e.$t("actions.loading"))}})],1)]):"error"===e.loader?t("div",{staticClass:"pos-card-loader"},[t("div",[t("IconBug",{attrs:{size:60}}),t("div",{staticClass:"uk-margin-small-top",domProps:{innerHTML:e._s(e.$t("actions.requestError"))}})],1)]):e._e()])],1)},d=[];const s=960;var i={name:"Card",components:{Loader:()=>a.e(9669).then(a.bind(a,9022)),IconBug:()=>a.e(9966).then(a.bind(a,1434))},props:{header:{default:!1,type:Boolean},headerLarge:{default:!1,type:Boolean},headerSmall:{default:!1,type:Boolean},headerPaddingNone:{default:!1,type:Boolean},headerBgrDefault:{default:!1,type:Boolean},headerLeft:{default:!1,type:Boolean},headerRight:{default:!1,type:Boolean},footer:{default:!1,type:Boolean},footerLeft:{default:!1,type:Boolean},footerRight:{default:!1,type:Boolean},bodyPadding:{default:!0,type:Boolean},bodyLeft:{default:!1,type:Boolean},bodyLeftPadding:{default:!0,type:Boolean},bodyLeftActionEvent:{default:!1,type:Boolean},bodyRight:{default:!1,type:Boolean},bodyRightPadding:{default:!0,type:Boolean},bodyRightToggleShow:{default:!1,type:Boolean},bodyRightShow:{default:!1,type:Boolean},loader:{default:"",type:String}},data(){return{bodyWidth:null,bodyLeftWidth:null}},mounted(){const e=new ResizeObserver((e=>{e.forEach((e=>{const t=e.contentRect;this.bodyWidth=Number(t.width.toFixed(0))}))}));e.observe(this.$refs.body),(this.bodyRight||this.bodyLeft)&&(this.bodyLeftWidth=this.$refs.bodyLeft.offsetWidth,window.addEventListener("resize",this.handleResize),this.bodyWidth<=s&&this.leftToggleState&&this.$store.commit("card_right_show",!1))},watch:{bodyWidth(){this.bodyWidth&&this.$emit("width",this.bodyWidth)},RightToggleState(){this.bodyWidth<=s&&this.leftToggleState&&this.$store.commit("editPanel_show",!1)},cardLeftClickAction(){this.bodyWidth<=s&&this.leftToggleState&&this.$store.commit("card_left_show",!1)}},computed:{RightToggleState(){return setTimeout((()=>{this.handleResize()}),300),this.$store.getters.pageTableRowShow},rightPanelSize(){return this.$store.getters.editPanel_large},leftToggleState(){return setTimeout((()=>{this.handleResize()}),300),this.$store.getters.cardLeftState},cardLeftClickAction(){return this.$store.getters.cardLeftClickAction}},beforeDestroy:function(){(this.bodyRight||this.bodyLeft)&&window.removeEventListener("resize",this.handleResize)},methods:{handleResize(){setTimeout((()=>{this.bodyWidth=this.$refs.body.offsetWidth}),300)}}},r=i,l=a(1656),h=(0,l.A)(r,o,d,!1,null,null,null),n=h.exports}}]);
//# sourceMappingURL=Card.db81ee3c.js.map