import{_ as m,d as h}from"./index-CbGDU7fj.js";import{c as g,l as i,K as n,e as s,m as l,j as p,q as I}from"./vue-Bqg3cjzV.js";const o=["/img/headerenvoice.png","/img/headeEnvoice.png"],f={name:"InvoiceHeader",props:{companyName:{type:String,default:""},imageHeight:{type:[Number,String],default:68},imageSrc:{type:String,default:""},companyLogo:{type:String,default:""}},data(){return{headerImageError:!1,candidateIndex:0}},computed:{headerCandidates(){const e=[];return this.imageSrc&&e.push(this.imageSrc),this.companyLogo&&e.push(h(this.companyLogo)),[...e,...o]},headerImageSrc(){return this.headerCandidates[this.candidateIndex]||o[0]}},watch:{headerCandidates(){this.candidateIndex=0,this.headerImageError=!1}},methods:{onHeaderImageError(){if(this.candidateIndex<this.headerCandidates.length-1){this.candidateIndex+=1;return}this.headerImageError=!0}}},u={class:"invoice-header mb-3 w-100"},E=["src"];function _(e,r,t,y,d,a){return I(),g("div",u,[i(s("img",{src:a.headerImageSrc,alt:"",class:"invoice-header-img",style:l({maxHeight:t.imageHeight+"px"}),onError:r[0]||(r[0]=(...c)=>a.onHeaderImageError&&a.onHeaderImageError(...c))},null,44,E),[[n,!d.headerImageError]]),i(s("h4",{class:"mb-0 fw-bold text-dark",style:{fontSize:"1.5rem"}},p(t.companyName||"Company"),513),[[n,d.headerImageError]])])}const v=m(f,[["render",_],["__scopeId","data-v-b2310842"]]);export{v as I};
