import{f as o}from"./BlockBalanceAgreement-2iQbaweR.js";import{R as _,f,c as a,a as t,h as u,t as s,v as n,F as m,i as b,o as d}from"./index-CipWZKo_.js";const x={class:"tw-my-5"},g={class:"tw-flex tw-items-center tw-justify-between tw-text-lg tw-pb-4 tw-mb-4 tw-border-b tw-border-gray-200"},y={class:"tw-text-right"},p={key:0,class:"tw-pb-4 tw-mb-4 tw-border-b tw-border-gray-200"},B={class:"tw-text-right"},j={class:"tw-text-right"},k={class:"tw-flex tw-items-center tw-justify-between tw-text-lg tw-mb-2"},S={class:"tw-text-right"},D={class:"tw-mb-4 tw-border-b tw-border-gray-200"},E={class:"tw-text-right"},N={class:"tw-text-right"},P={key:1,class:"tw-flex tw-items-center tw-justify-between tw-text-xl tw-font-medium tw-pb-2 tw-mb-2 tw-border-b tw-border-gray-200"},C={class:"tw-text-gray-400 tw-text-right tw-line-through"},F={class:"tw-text-red-500 tw-text-right"},R={class:"tw-flex tw-justify-between tw-items-center"},V={class:"tw-text-xl tw-font-medium"},A={class:"tw-text-xl tw-font-medium"},T=_({__name:"TotalAmount",props:{tariff:{},additionalServices:{}},setup(v){const w=v,c=f(()=>w.tariff.Bonuses?w.tariff.Bonuses.reduce((e,i)=>e+i.Economy,0):0),l=f(()=>w.additionalServices?w.additionalServices.reduce((e,i)=>e+i.Price,0):0);return(e,i)=>(d(),a("div",x,[t("div",g,[i[0]||(i[0]=t("div",{class:"tw-text-right"},"Цена тарифа",-1)),t("div",y,s(n(o)(e.tariff.price)),1)]),e.tariff.Bonuses?.length>0?(d(),a("div",p,[(d(!0),a(m,null,b(e.tariff.Bonuses,(r,h)=>(d(),a("div",{key:h,class:"tw-flex tw-items-center tw-justify-between tw-text-gray-500 tw-text-base"},[t("div",B,"Скидка "+s(r?.Discount)+"% на "+s(r?.Days)+" дней",1),t("div",j,"-"+s(n(o)(r?.Economy)),1)]))),128))])):u("",!0),t("div",k,[i[1]||(i[1]=t("div",{class:"tw-text-right"},"Дополнительные услуги",-1)),t("div",S,s(n(o)(l.value)),1)]),t("div",D,[(d(!0),a(m,null,b(e.additionalServices,r=>(d(),a("div",{key:r.ServiceID,class:"tw-flex tw-items-center tw-justify-between tw-text-gray-500 tw-text-base tw-pb-2"},[t("div",E,s(r.Name),1),t("div",N,s(n(o)(r.Price)),1)]))),128))]),e.tariff.Bonuses?.length>0?(d(),a("div",P,[i[2]||(i[2]=t("div",{class:"tw-text-red-500"},"Выгода",-1)),t("div",null,[t("div",C,s(n(o)(e.tariff.price+l.value)),1),t("div",F,"-"+s(n(o)(c.value)),1)])])):u("",!0),t("div",R,[t("div",V,"Итого за "+s(e.tariff.label),1),t("div",A,s(n(o)(e.tariff.price-c.value+l.value)),1)])]))}});export{T as _};
