import{E as _,o as s,c as V,w as l,b as c,a as d,t as i,m as v,f as u,j as w}from"./vendor-1-1-46.js";import{_ as g}from"./MdrModal-1-1-46.js";import{_ as h}from"./ResourceStore-1-1-46.js";const k={key:0},y=["src"],B={key:1},b={class:"flex gap-3 justify-end w-full"},x={class:"flex gap-2"},N={__name:"BarcodeModal",props:{modelValue:Boolean,pdfUrl:{type:String,default:""},disableReload:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:f}){const n=a,m=f,o=w({get(){return n.modelValue},set(e){m("update:modelValue",e)}}),p=()=>{const e=document.querySelector("#barcode-pdf");e&&(e.contentWindow.focus(),e.contentWindow.print())};return _(o,(e,t)=>{n.disableReload||!e&&t&&window.location.reload()}),(e,t)=>(s(),V(g,{modelValue:o.value,"onUpdate:modelValue":t[1]||(t[1]=r=>o.value=r),size:"md:size-4/5 lg:size-3/5"},{title:l(()=>[u(i(e.$t("barcode_prinout")),1)]),actions:l(()=>[d("div",b,[d("div",x,[v(h,{onClick:t[0]||(t[0]=r=>o.value=!o.value)},{default:l(()=>[u(i(e.$t("ok")),1)]),_:1})])])]),default:l(()=>[a.pdfUrl?(s(),c("div",k,[d("iframe",{id:"barcode-pdf",src:a.pdfUrl,width:"100%",height:"500px",onLoad:p},null,40,y)])):(s(),c("div",B,[d("div",null,i(a.pdfUrl),1)]))]),_:1},8,["modelValue"]))}};export{N as _};
