import e from"@babel/runtime/helpers/defineProperty";import r from"prop-types";import{Grid as l,Tooltip as t}from"@material-ui/core";import{useStyles as i}from"../sharedStyles.js";import{CONTAINER_XS as o}from"../constants.js";import{FormatedNumber as a}from"./FormatedNumber.js";import{isMobileDetected as m}from"../../../../../utils/mobileDetect.js";import{getUnitDisplay as s}from"../../../../../utils/index.js";import{jsxs as n,jsx as c}from"react/jsx-runtime";function p(r){var p=r.label,u=r.unit,d=r.value,f=r.format,b=r.placeholder,h=r.xs,v=i({isMobile:m}),j=u?"".concat(p," (").concat(s(u),")"):p;return n(l,{item:!0,xs:m?o:h,className:e({},v.cellInnerMobile,m),children:[c(t,{title:j,children:c("div",{className:v.cellLabel,children:j})}),c("div",{className:v.cellValue,children:f?c(a,{value:d,format:f,placeholder:b}):d||b})]})}p.propTypes={label:r.string.isRequired,unit:r.string,value:r.any,format:r.string,placeholder:r.string,xs:r.number.isRequired},p.defaultProps={unit:null,value:null,format:"0.00",placeholder:"—"};export{p as StaticField};
