"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("classnames"),n=require("@material-ui/core"),a=require("../../../constants/appPackages.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(t),s=n.makeStyles((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"}}}));exports.VersionBadge=function(t){var n,o=t.appPackage,d=s();if(!o)return null;var l=o.label,p=o.version,c=o.package_code_version;return l===a.PACKAGE_LABELS.PROD?null:r.jsx("div",e.__assign({className:i.default(d.versionContainer,(n={},n[d.versionContainerBeta]=l===a.PACKAGE_LABELS.BETA,n[d.versionContainerDev]=l===a.PACKAGE_LABELS.DEV,n))},{children:r.jsx("p",e.__assign({"data-testid":"DC_versionBadge",className:d.versionText},{children:l?a.TEXT_FOR_PACKAGE_LABELS[l]:"v".concat(c||p)}))}))};
