import{__rest as s,__assign as o}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as i,jsx as c}from"react/jsx-runtime";import{forwardRef as n,useCallback as e,isValidElement as t,cloneElement as m}from"react";import r from"classnames";import{CloseSmallIcon as l}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";import a from"./Chip.scss.js";var d={default:a.default,caution:a.caution,info:a.info,error:a.error,pending:a.pending,success:a.success,warning:a.warning},u={default:a.filled,outlined:a.outlined},p={medium:a.medium,small:a.small,xs:a.xsmall},I={medium:24,small:16,xs:12},f=n((function(n,f){var j=n.disabled,h=n.prefix,x=n.suffix,C=n.testId,b=n.className,k=n.children,v=n.onClick,F=n.onDelete,g=n.size,z=void 0===g?"medium":g,N=n.state,w=void 0===N?"default":N,A=n.type,D=void 0===A?"default":A,E=s(n,["disabled","prefix","suffix","testId","className","children","onClick","onDelete","size","state","type"]),M=j?void 0:v,O=e((function(s){s.stopPropagation(),null==F||F(s)}),[F]);return i("div",o({className:r(a.root,M&&a.hoverable,j&&a.disabled,h&&a.withPrefix,(F||x)&&a.withSuffix,p[z],u[D],d[w],b),onClick:M,"data-testid":C,ref:f},E,{children:[h&&t(h)?m(h,{size:I[z]}):h,c("div",{className:a.label,children:k}),x&&t(x)?m(x,{size:I[z]}):x,F&&c(l,{className:a.deleteIcon,onClick:O,size:16})]}))}));export{f as Chip};
