Liferay.Loader.define("segments-web@3.0.68/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=d(r("@frontend-taglib-clay$clayui/icon")),n=d(r("liferay!frontend-js-react-web$classnames")),i=(d(r("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();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"),s=r("../../utils/constants.es"),l=r("../../utils/drag-types.es");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}const e={[s.PROPERTY_TYPES.BOOLEAN]:"check-circle",[s.PROPERTY_TYPES.COLLECTION]:"table",[s.PROPERTY_TYPES.DATE]:"date",[s.PROPERTY_TYPES.DATE_TIME]:"date",[s.PROPERTY_TYPES.DOUBLE]:"decimal",[s.PROPERTY_TYPES.ID]:"diagram",[s.PROPERTY_TYPES.INTEGER]:"integer",[s.PROPERTY_TYPES.STRING]:"text"};class u extends i.Component{render(){const{className:t,connectDragSource:r,dragging:c,label:s,type:l}=this.props,o=(0,n.default)("criteria-sidebar-item-root",{dragging:c},t);return r(i.default.createElement("li",{className:o},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[l]||"text"}))),s))}}var f=(0,c.DragSource)(l.DragTypes.PROPERTY,{beginDrag:function({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()})))(u);t.default=f}}));
//# sourceMappingURL=CriteriaSidebarItem.es.js.map