@scandit/web-datacapture-core
Version:
Scandit Data Capture SDK for the Web
1 lines • 1.1 kB
JavaScript
import {a}from'./chunk-KUVVZN66.js';function i(t){var f,c,a,s,l,x;let u=t.style,m={cornerRadius:4,fitToText:false,hintAnchor:"top",hintAnchorOffset:16,horizontalMargin:16,isAnimatedToView:true,lineHeight:24,maxLines:2,maxWidthFraction:1,textAlignment:"start",textSize:14,textWeight:700},n,o,e;switch(u){case "success":n="check",o="28d37fcc",e="ffffffff";break;case "error":n="exclamationMark",o="f94444cc",e="ffffffff";break;case "warning":n="exclamationMark",o="f9bf2bcc",e="111619ff";break;case "info":n="exclamationMark",o="111619cc",e="ffffffff";break;default:n="none",o="111619cc",e="ffffffff";break}return t.icon&&(n="none"),{hintStyle:{...m,hintIcon:n,backgroundColor:(c=(f=t.backgroundColor)==null?void 0:f.toJSON())!=null?c:o,textColor:(s=(a=t.textColor)==null?void 0:a.toJSON())!=null?s:e,iconColor:(x=(l=t.textColor)==null?void 0:l.toJSON())!=null?x:e},tag:t.tag,text:t.message}}var h=i(new a("Error","an-error","error")),k=i(new a("Success","a-success","success")),C=i(new a("Warning","a-warning","warning")),H=i(new a("Info","an-info","info"));export{i as a,h as b,k as c,C as d,H as e};