import{jsx as e}from"react/jsx-runtime";import r from"classnames";import{makeStyles as o}from"@material-ui/core";import{PACKAGE_LABELS as t,TEXT_FOR_PACKAGE_LABELS as n}from"../../../constants/appPackages.js";var a=o((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"}}})),i=function(o){var i,p=o.appPackage,s=a();if(!p)return null;var c=p.label,d=p.version,l=p.package_code_version;return c===t.PROD?null:e("div",{className:r(s.versionContainer,(i={},i[s.versionContainerBeta]=c===t.BETA,i[s.versionContainerDev]=c===t.DEV,i)),children:e("p",{"data-testid":"DC_versionBadge",className:s.versionText,children:c?n[c]:"v".concat(l||d)})})};export{i as VersionBadge};
