import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["value","onChange","multiple","getItemKey","getItemLabel"];import React,{forwardRef}from"react";import{Chips}from"./..";import{useChoiceGroup}from"../../../hooks/useChoiceGroup";import{defaultGetItemLabel}from"../helpers";export var getUndefined=function(){};export var getItemKeyDefault=function(a){return a.key};var ChipsChoiceRender=function(a,b){var c=a.value,d=a.onChange,e=a.multiple,f=a.getItemKey,g=void 0===f?getItemKeyDefault:f,h=a.getItemLabel,i=void 0===h?defaultGetItemLabel:h,j=_objectWithoutProperties(a,_excluded),k=useChoiceGroup({getKey:function getKey(a){var b=g(a);return typeof b!==void 0&&b?b:i(a)},value:c,callBack:d,multiple:e}),l=k.getOnChange,m=k.getChecked;return React.createElement(Chips,Object.assign({},j,{ref:b,onItemRightIconClick:getUndefined,onItemClick:function onItemClick(a,b){var c=b.e;return l(a)(c)},getItemIconRight:getUndefined,getItemAttributes:getUndefined,getItemActive:m,interactive:!0}))};export var ChipsChoice=forwardRef(ChipsChoiceRender);
//# sourceMappingURL=ChipsChoice.js.map