"use strict";(globalThis["webpackChunkkiarashFit"]=globalThis["webpackChunkkiarashFit"]||[]).push([[732],{4732:(a,t,e)=>{e.r(t),e.d(t,{default:()=>F});var l=e(1347),s=e(7763);const o={key:0,class:"row col-12 flex flex-center"},i=["onClick"],n={class:"row col-12 text-bold"},r={class:"row col-12 text-caption"},c={class:"row col-12 text-caption"};function d(a,t,e,d,m,u){const h=(0,l.g2)("ViewMealData"),D=(0,l.g2)("q-dialog");return a.ditPlanData&&a.ditPlanData.meals?.length>0?((0,l.uX)(),(0,l.CE)("div",o,[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(a.ditPlanData.meals,((t,e)=>((0,l.uX)(),(0,l.CE)("div",{class:"row col-11 q-mx-auto text- color-grey q-pa-md cursor-pointer meals",style:{border:"solid 1px","border-radius":"8px"},key:e,onClick:e=>a.showSessionItem(t)},[(0,l.Lk)("div",n,(0,s.v_)(t.title),1),(0,l.Lk)("div",r,(0,s.v_)(t.short_desc),1),(0,l.Lk)("div",c,(0,s.v_)("تعداد غذاها: "+(t.mealItem?.length||"-")),1)],8,i)))),128)),(0,l.bF)(D,{modelValue:a.mealItemsDia,"onUpdate:modelValue":t[0]||(t[0]=t=>a.mealItemsDia=t),"full-width":""},{default:(0,l.k6)((()=>[(0,l.bF)(h,{mealData:a.mealData},null,8,["mealData"])])),_:1},8,["modelValue"])])):(0,l.Q3)("",!0)}var m=e(1400);const u={class:"text-center col-12 text-bold text-primary q-pa-sm"},h={class:"row q-pa-md col-6 full-width"},D={class:"col-6 bg-white text-left"},p={class:"col-6 bg-white text-right"};function v(a,t,e,o,i,n){const r=(0,l.g2)("q-btn"),c=(0,l.g2)("q-card"),d=(0,l.gN)("close-popup");return(0,l.uX)(),(0,l.Wv)(c,{class:"hide-scrollbar row col-12 relative-position q-pa-md flex flex-center relative-position"},{default:(0,l.k6)((()=>[(0,l.bo)((0,l.bF)(r,{icon:"close",size:"md",square:"",color:"red",class:"absolute-top-right"},null,512),[[d]]),(0,l.Lk)("div",u,(0,s.v_)(a.mealData.title),1),(0,l.Lk)("div",null,(0,s.v_)(a.mealData.short_desc),1),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(a.mealData.items,((a,t)=>((0,l.uX)(),(0,l.CE)("div",h,[(0,l.Lk)("div",D,(0,s.v_)(a.title),1),(0,l.Lk)("div",p,(0,s.v_)(a.amount),1)])))),256))])),_:1})}const w=(0,l.pM)({components:{},props:{mealData:{type:Object,required:!0}},data(){return{mealItemDia:!1,mealItemData:null}},mounted(){console.log({mealData:this.mealData})},methods:{showExercise(a){this.mealItemData=a,this.mealItemDia=!0}}});var g=e(2968),k=e(3341),b=e(2677),x=e(8657),f=e(272),I=e.n(f);const _=(0,g.A)(w,[["render",v]]),C=_;I()(w,"components",{QCard:k.A,QBtn:b.A}),I()(w,"directives",{ClosePopup:x.A});const q=(0,l.pM)({name:"ViewDietProgram",components:{ViewMealData:C},data(){return{userData:{},ditPlanData:null,mealData:null,mealItemsDia:!1}},mounted(){this.fetchData()},methods:{async fetchData(){this.userData=await(0,m.Z)().fetchUserData(),this.ditPlanData=JSON.parse(this.userData.meta.ditPlanData||"{}"),console.log(this.ditPlanData)},showSessionItem(a){this.mealData=a,this.mealItemsDia=!0}}});var P=e(45);const y=(0,g.A)(q,[["render",d],["__scopeId","data-v-043a3d2a"]]),F=y;I()(q,"components",{QDialog:P.A})}}]);