{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/CardDesign2/index.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from \"react\";\nimport IconText from \"../IconText\";\nimport ButtonDivTag from \"../ButtonDivTag\";\nimport TitleSubtitle from \"../TitleSubtitle\";\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst CardDesign2 = _ref => {\n _s();\n\n let {\n buttons\n } = _ref;\n const [dokmeha, updateDokmeha] = useState(buttons);\n\n function handleOnDragEnd(result) {\n if (!result.destination) return;\n const items = Array.from(dokmeha);\n const [reorderedItem] = items.splice(result.source.index, 1);\n items.splice(result.destination.index, 0, reorderedItem);\n updateDokmeha(items);\n }\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"max-h-[400px] overflow-y-auto scrollYDesign w-full flex flex-col p-4 bg-white shadow rounded mt-3\",\n children: [/*#__PURE__*/_jsxDEV(TitleSubtitle, {\n subTitle: false,\n title: \"افراد حاضر در این سالن\",\n titleClassName: \"font-bold text-primary\",\n titleBorderClassName: \"w-1 h-5 bg-green-400 ml-1.5\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(IconText, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(DragDropContext, {\n onDragEnd: handleOnDragEnd,\n children: /*#__PURE__*/_jsxDEV(Droppable, {\n droppableId: \"container\",\n children: provided => /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex flex-col gap-y-4 justify-aroundw-full\",\n ...provided.droppableProps,\n ref: provided.innerRef,\n id: \"container\",\n children: [dokmeha.map((btn, index) => /*#__PURE__*/_jsxDEV(Draggable, {\n draggableId: \"e\" + btn.id,\n index: index,\n children: provided => /*#__PURE__*/_jsxDEV(\"div\", {\n className: `w-1/2 px-1`,\n children: /*#__PURE__*/_jsxDEV(ButtonDivTag, {\n props: {\n ref: provided.innerRef,\n ...provided.draggableProps,\n ...provided.dragHandleProps\n },\n className: `${btn.className} w-full h-full text-white py-3 border-none text-xs rounded-sm`,\n style: provided.draggableProps.style,\n text: btn.name\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 48,\n columnNumber: 23\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 21\n }, this)\n }, btn.id, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 17\n }, this)), provided.placeholder]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }, this);\n};\n\n_s(CardDesign2, \"KEE5snQsBqXc0Kww9bnRe6PZ6fQ=\");\n\n_c = CardDesign2;\nexport default CardDesign2;\nCardDesign2.defaultProps = {\n buttons: [{\n id: 1,\n name: \"پنجره\",\n className: \"bg-[#FFF7BF]\"\n }, {\n id: 2,\n name: \"کمک اولیه\",\n className: \"bg-[#DBFDFF]\"\n }, {\n id: 3,\n name: \"درب خروجی\",\n className: \"bg-[#828282]\"\n }, {\n id: 4,\n name: \"سیستم سرمایش\",\n className: \"bg-[#F6FFEB]\"\n }, {\n id: 5,\n name: \"آب سردکن\",\n className: \"bg-[#F0FFB4]\"\n }, {\n id: 6,\n name: \"سرویس بهداشتی\",\n className: \"bg-[#FFDD8E]\"\n }, {\n id: 7,\n name: \"حمام\",\n className: \"bg-[#EEEFFF]\"\n }, {\n id: 8,\n name: \"تخت\",\n className: \"bg-[#FFF5EE]\"\n }]\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"CardDesign2\");","map":{"version":3,"names":["React","useState","IconText","ButtonDivTag","TitleSubtitle","DragDropContext","Droppable","Draggable","CardDesign2","buttons","dokmeha","updateDokmeha","handleOnDragEnd","result","destination","items","Array","from","reorderedItem","splice","source","index","provided","droppableProps","innerRef","map","btn","id","ref","draggableProps","dragHandleProps","className","style","name","placeholder","defaultProps"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/CardDesign2/index.js"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport IconText from \"../IconText\";\nimport ButtonDivTag from \"../ButtonDivTag\";\nimport TitleSubtitle from \"../TitleSubtitle\";\n\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\n\nconst CardDesign2 = ({ buttons }) => {\n const [dokmeha, updateDokmeha] = useState(buttons);\n\n function handleOnDragEnd(result) {\n if (!result.destination) return;\n\n const items = Array.from(dokmeha);\n const [reorderedItem] = items.splice(result.source.index, 1);\n items.splice(result.destination.index, 0, reorderedItem);\n\n updateDokmeha(items);\n }\n\n return (\n