import 'core-js/modules/es.object.assign.js';
import { __rest } from '../../../_virtual/_tslib.js';
import { jsx } from 'react/jsx-runtime';
import { Chip as Chip$1 } from '@mui/material';
import { IconFont } from '../IconFont/IconFont.js';

const Chip = _a => {
  var {
      label,
      hasCheckIcon,
      disabled,
      hasDeleteIcon,
      onClick,
      onDelete,
      sx
    } = _a,
    props = __rest(_a, ["label", "hasCheckIcon", "disabled", "hasDeleteIcon", "onClick", "onDelete", "sx"]);
  return jsx(Chip$1, Object.assign({
    icon: hasCheckIcon ? jsx(IconFont, {
      name: "check_circle",
      style: {
        paddingRight: 8
      },
      fontSize: 16
    }) : undefined,
    variant: disabled ? 'outlined' : 'filled',
    label: label,
    sx: Object.assign({
      paddingLeft: hasCheckIcon ? '4px' : '10px',
      paddingRight: hasDeleteIcon ? '4px' : '10px'
    }, sx),
    onClick: onClick,
    onDelete: hasDeleteIcon ? onDelete : undefined,
    color: "primary",
    disabled: disabled,
    deleteIcon: hasDeleteIcon ? jsx(IconFont, {
      name: "cancel",
      fontSize: 16
    }) : undefined
  }, props));
};

export { Chip, Chip as default };
