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