import{__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import s from"prop-types";import t from"classnames";import{capitalize as c}from"lodash";import{makeStyles as e,Tooltip as n,Chip as r}from"@material-ui/core";import{CloseSmallIcon as p}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";var m=e((function(o){return{rootChip:{"&.MuiChip-root":{backgroundColor:o.palette.background.b9,color:o.palette.primary.text6,textAlign:"center","&:hover":{color:o.palette.primary.contrastText,"& .MuiSvgIcon-root":{color:o.palette.primary.contrastText}},"& span.MuiChip-label":{padding:0}}},tooltip:{marginTop:"10px"},closeIcon:{marginRight:"-2px !important",marginLeft:"2px !important",color:o.palette.primary.text6},sizeSmall:{"&.MuiChip-root":{minWidth:16,height:16,padding:"1px 2px","& span":{fontSize:"11px",lineHeight:"14px"}}},sizeSmallLimited:{"&.MuiChip-root":{padding:"1px 3px"}},sizeMedium:{"&.MuiChip-root":{minWidth:24,height:24,padding:"2px 4px","& span":{fontSize:"14px",lineHeight:"20px"}}},sizeMediumLimited:{"&.MuiChip-root":{padding:"2px 6px"}},sizeMediumClickable:{"&.MuiChip-root":{padding:"2px 6px"}},sizeLarge:{"&.MuiChip-root":{minWidth:32,height:32,padding:"5px 7px","& span":{fontSize:"16px",lineHeight:"22px"}}},sizeLargeLimited:{"&.MuiChip-root":{padding:"5px 8px"}},sizeLargeClickable:{"&.MuiChip-root":{padding:"5px 8px"}}}})),l=function(s){var e=s.classes,l=s.size,a=s.limited,d=s.clickable,u=s.tooltip,h=m();return i(n,o({title:u,classes:{tooltip:h.tooltip}},{children:i(r,o({},s,{classes:o(o({},e),{root:t(e.root,h.rootChip,h["size".concat(c(l))],a&&h["size".concat(c(l),"Limited")],d&&h["size".concat(c(l),"Clickable")])}),clickable:d,deleteIcon:i(p,{className:h.closeIcon,size:16})}))}))},a={classes:s.shape({root:s.string}),size:s.oneOf(["small","medium","large"]),limited:s.bool,clickable:s.bool,label:s.string.isRequired,tooltip:s.string};l.propTypes=a,l.defaultProps={classes:{},size:"medium",limited:!1,clickable:!1,tooltip:""};export{l as default};
