Liferay.Loader.define("segments-web@3.0.77/js/components/criteria_sidebar/CriteriaSidebarItem.es",["module","exports","require","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","liferay!frontend-js-react-web$react-dnd","../../utils/constants.es","../../utils/drag-types.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),n=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),i=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=a?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),c=r("liferay!frontend-js-react-web$react-dnd"),l=r("../../utils/constants.es"),s=r("../../utils/drag-types.es");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const e={[l.PROPERTY_TYPES.BOOLEAN]:"check-circle",[l.PROPERTY_TYPES.COLLECTION]:"table",[l.PROPERTY_TYPES.DATE]:"date",[l.PROPERTY_TYPES.DATE_TIME]:"date",[l.PROPERTY_TYPES.DOUBLE]:"decimal",[l.PROPERTY_TYPES.ID]:"diagram",[l.PROPERTY_TYPES.INTEGER]:"integer",[l.PROPERTY_TYPES.STRING]:"text"};class CriteriaSidebarItem extends i.Component{render(){const{className:t,connectDragSource:r,dragging:c,label:l,type:s}=this.props,o=(0,n.default)("criteria-sidebar-item-root",{dragging:c},t);return r(i.default.createElement("li",{className:o,tabIndex:"0"},i.default.createElement("span",{className:"inline-item"},i.default.createElement(a.default,{symbol:"drag"})),i.default.createElement("span",{className:"criteria-sidebar-item-type sticker sticker-dark"},i.default.createElement("span",{className:"inline-item"},i.default.createElement(a.default,{symbol:e[s]||"text"}))),l))}}var o=(0,c.DragSource)(s.DragTypes.PROPERTY,{beginDrag:function beginDrag({defaultValue:e,name:t,propertyKey:r,type:a}){return{criterion:{defaultValue:e,propertyName:t,type:a},propertyKey:r}}},((e,t)=>({connectDragSource:e.dragSource(),dragging:t.isDragging()})))(CriteriaSidebarItem);t.default=o}}));
//# sourceMappingURL=CriteriaSidebarItem.es.js.map