import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import o from"classnames";import{makeStyles as t}from"@material-ui/core";import{PACKAGE_LABELS as n,TEXT_FOR_PACKAGE_LABELS as a}from"../../../constants/appPackages.js";var i=t((function(e){return{versionContainer:{marginRight:15,display:"flex",position:"relative",height:"20px",alignItems:"center",background:e.palette.background.b6,color:e.palette.primary.text1,"&::after":{content:"''",borderTop:"20px solid ".concat(e.palette.background.b6),borderLeft:"5px solid ".concat(e.palette.background.b6),borderRight:"5px solid transparent",position:"absolute",right:"-10px",top:0,paddingLeft:"5px"}},versionContainerBeta:{background:"#ee4b69","&::after":{borderTop:"20px solid #ee4b69",borderLeft:"5px solid #ee4b69"}},versionContainerDev:{background:"#4b8cee","&::after":{borderTop:"20px solid #4b8cee",borderLeft:"5px solid #4b8cee"}},versionText:{zIndex:1,fontSize:"12px",fontStyle:"italic",margin:0,padding:"1px 0 0 5px"}}})),s=function(t){var s,p=t.appPackage,d=i();if(!p)return null;var l=p.label,c=p.version,b=p.package_code_version;return l===n.PROD?null:r("div",e({className:o(d.versionContainer,(s={},s[d.versionContainerBeta]=l===n.BETA,s[d.versionContainerDev]=l===n.DEV,s))},{children:r("p",e({"data-testid":"DC_versionBadge",className:d.versionText},{children:l?a[l]:"v".concat(b||c)}))}))};export{s as VersionBadge};
