import{a as T}from"./chunk-TAT3HGQ4.js";import{a as E}from"./chunk-YQXLYYOT.js";import{a as I}from"./chunk-YHVRQUSB.js";import{a as B}from"./chunk-43BLBOSI.js";import"./chunk-IWSLIKCG.js";import"./chunk-2DXJE6G7.js";import"./chunk-7RP244JU.js";import"./chunk-ZKNPBXGB.js";import{d as y,f as C}from"./chunk-S3ADKFO2.js";import{E as b,n as w}from"./chunk-I5MYHHJE.js";import{Ab as S,Fb as c,Fc as l,Gb as i,Gc as s,Hb as n,Hc as _,Ib as u,S as f,Vb as v,Wa as t,f as g,gb as m,ic as r,jc as a,lb as x,zb as h}from"./chunk-CKLXM6EG.js";import"./chunk-TSRGIXR5.js";function M(p,o){if(p&1&&(i(0,"div",1)(1,"div",3)(2,"div",4)(3,"p",5),r(4),l(5,"translate"),n(),i(6,"p",6),r(7),l(8,"translate"),n()(),i(9,"div",4)(10,"p",5),r(11),l(12,"translate"),n(),i(13,"p",6),r(14),n()(),i(15,"div",4)(16,"p",5),r(17),l(18,"translate"),n(),i(19,"p",6),r(20),n()(),i(21,"div",4)(22,"p",5),r(23),l(24,"translate"),n(),i(25,"p",6),r(26),l(27,"translate"),n()(),i(28,"div",4)(29,"p",5),r(30),l(31,"translate"),n(),i(32,"p",6),r(33),n()(),i(34,"div",4)(35,"p",5),r(36),l(37,"translate"),n(),i(38,"p",6),r(39),n()()()()),p&2){let e=v();t(4),a(s(5,12,"form.enter_month")),t(3),a(s(8,14,"months."+(e.values==null?null:e.values.month))),t(4),a(s(12,16,"form.enter_year")),t(3),a(e.values==null?null:e.values.year),t(3),a(_(18,18,"form.enter_remaining_amount",e.getTranslateParams("form.enter_remaining_amount"))),t(3),a(e.values==null?null:e.values.remaining_amount),t(3),a(s(24,21,"form.enter_notes")),t(3),a((e.values==null?null:e.values.notes)||s(27,23,"No_info")),t(4),a(s(31,25,"budget.created_at")),t(3),a(e.values==null?null:e.values.created_at),t(3),a(s(37,27,"budget.updated_at")),t(3),a(e.values==null?null:e.values.updated_at)}}function A(p,o){if(p&1&&u(0,"app-error-card",2),p&2){let e=v();c("message",e.Error)}}var P=class p{constructor(o,e,d){this.route=o;this.apiService=e;this.currencyService=d}title="show_budget";translationPrefix="budget";values;Error;destroy$=new g;ngOnInit(){this.route.paramMap.subscribe(o=>{let e=o.get("id");e&&this.getDetails(e)})}getDetails(o){this.apiService.Get(`procurement/purchasing-budget/show/${o}`).pipe(f(this.destroy$)).subscribe({next:e=>{this.values=e.data,console.log(this.values)},error:e=>{console.error("Error fetching:",e),this.Error=e.error.message}})}getTranslateParams(o){let e=(o||"").toLowerCase();return this.currencyService.getTranslateParams(e)}static \u0275fac=function(e){return new(e||p)(m(b),m(I),m(E))};static \u0275cmp=x({type:p,selectors:[["app-show-budget"]],decls:4,vars:5,consts:[[3,"title","Translationprefix","showTitle","showBreadcrumb"],[1,"container-fluid","mt-5","bg-white","rounded-3","p-3"],[3,"message"],[1,"row","g-3"],[1,"col-md-6","col-sm-12"],[1,"title"],[1,"input"]],template:function(e,d){e&1&&(i(0,"section"),u(1,"app-page-title",0),h(2,M,40,29,"div",1)(3,A,1,1,"app-error-card",2),n()),e&2&&(t(),c("title",d.title)("Translationprefix",d.translationPrefix)("showTitle",!0)("showBreadcrumb",!0),t(),S(d.Error?3:2))},dependencies:[B,w,C,T,y],styles:["p[_ngcontent-%COMP%]{font-weight:400}.title[_ngcontent-%COMP%]{color:#000;font-size:20px;font-style:normal;font-weight:700;line-height:normal}.input[_ngcontent-%COMP%]{border-radius:8px;background:#f7f7f7;display:flex;width:100%;height:50px;padding:16px;align-items:center;gap:10px}"]})};export{P as ShowBudget};
