"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require('./../../ext-esm/tslib/tslib.es6.js'),e=require("react/jsx-runtime"),i=require("react"),o=require("classnames"),c=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js");var n=require("./Chip.scss.js");function r(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var u=r(o),t={default:n.default,caution:n.caution,info:n.info,error:n.error,pending:n.pending,success:n.success,warning:n.warning},l={default:n.filled,outlined:n.outlined},a={medium:n.medium,small:n.small,xs:n.xsmall},d={medium:24,small:16,xs:12},m=i.forwardRef((function(o,r){var m=o.disabled,j=o.prefix,q=o.suffix,f=o.testId,I=o.className,p=o.children,x=o.onClick,h=o.onDelete,C=o.size,b=void 0===C?"medium":C,v=o.state,k=void 0===v?"default":v,g=o.type,E=void 0===g?"default":g,F=s.__rest(o,["disabled","prefix","suffix","testId","className","children","onClick","onDelete","size","state","type"]),_=m?void 0:x,w=i.useCallback((function(s){s.stopPropagation(),null==h||h(s)}),[h]);return e.jsxs("div",s.__assign({className:u.default(n.root,_&&n.hoverable,m&&n.disabled,j&&n.withPrefix,(h||q)&&n.withSuffix,a[b],l[E],t[k],I),onClick:_,"data-testid":f,ref:r},F,{children:[j&&i.isValidElement(j)?i.cloneElement(j,{size:d[b]}):j,e.jsx("div",{className:n.label,children:p}),q&&i.isValidElement(q)?i.cloneElement(q,{size:d[b]}):q,h&&e.jsx(c.CloseSmallIcon,{className:n.deleteIcon,onClick:w,size:16})]}))}));exports.Chip=m;
