import{h}from"./index-38ad4957.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{E as ErrorView}from"./ErrorView-74cb3af8.js";var style={DialogContainer:{maxWidth:"390px !important"},Container:{width:"100%",display:"flex",flexDirection:"row",gap:"var(--sl-spacing-small)"},TextContainer:{display:"flex",gap:"var(--sl-spacing-medium)",flexDirection:"column",alignItems:"center"},ButtonContainer:{display:"flex",gap:"var(--sl-spacing-medium)"},FooterContainer:{textAlign:"left",display:"flex",flexDirection:"column",gap:"var(--sl-spacing-medium)"},CodeContainer:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center"},Code:{width:"100%",height:"100%",maxWidth:"335px"},LoadingSkeleton:{"&::part(indicator)":{borderRadius:"0px !important"}}};var sheet=createStyleSheet(style);var styleString=sheet.toString();var vanillaStyle="\n  :host{\n    display: flex;\n    width: 100%;\n  }\n  @media (max-width: 499px) {\n    :host{\n      display: block;\n    }\n\n  }";function QrCodeView(e){var t=e.error,r=e.qrLink,i=e.titleText,a=e.downloadCodeText,n=e.printCodeText,l=e.errorHeaderText,s=e.errorDescriptionText,o=e.createDownloadable,d=e.createPrintable,p=e.hideTitle,c=e.alignment,m=e.loading;var x=c==="left"?"flex-start":c==="right"?"flex-end":"center";var g=function(e,t,r){if(e){return h(ErrorView,{loadingErrorAlertDescription:l,loadingErrorAlertHeader:s})}else if(r){return h("sqm-skeleton",{height:"100px",width:"100px"})}else if(t){return h("svg",{width:"100",height:"100"},h("image",{href:t,width:"100",height:"100"}))}return null};var f=g(t,r,m);return h("div",{class:sheet.classes.Container,style:{justifyContent:x},part:"sqm-base"},h("style",null,vanillaStyle),h("style",null,styleString),h("div",{class:sheet.classes.TextContainer,style:{alignItems:x}},!p&&h("span",{part:"sqm-title"},i),f,h("div",{class:sheet.classes.ButtonContainer},h("sl-button",{loading:m,size:"small",exportparts:"base: primarybutton-base",type:"primary",onClick:o},a),h("sl-button",{loading:m,size:"small",exportparts:"base: secondarybutton-base",type:"text",onClick:d},n))))}export{QrCodeView as Q};