{"version":3,"sources":["webpack:///./src/components/ui/Modal.vue?9889","webpack:///./src/views/admin/builder/AdminBuilderCreateHouse.vue?16bd","webpack:///./src/components/ui/Modal.vue?3eee","webpack:///./src/components/ui/Modal.vue","webpack:///./src/components/ui/Modal.vue?5652","webpack:///./src/views/admin/builder/AdminBuilderCreateHouse.vue?0f1a","webpack:///./src/views/admin/builder/AdminBuilderCreateHouse.vue","webpack:///./src/views/admin/builder/AdminBuilderCreateHouse.vue?4a6d"],"names":["_hoisted_1","class","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_Teleport","to","_createVNode","_Transition","name","transitionName","appear","default","_withCtx","isOpen","_createElementBlock","key","_normalizeClass","classes","_createElementVNode","onClick","close","showContainer","props","maxWidth","showClose","_createCommentVNode","_renderSlot","$slots","undefined","_","_defineComponent","__name","type","Boolean","String","Array","emits","setup","__props","expose","__expose","emit","watch","document","body","classList","add","remove","immediate","keyPress","event","code","addEventListener","onBeforeUnmount","removeEventListener","__returned__","Object","defineProperty","enumerable","value","__exports__","_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","src","_imports_0","alt","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_imports_2","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_imports_1","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","_hoisted_66","_hoisted_67","_hoisted_68","_hoisted_69","_hoisted_70","_hoisted_71","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","_hoisted_79","_hoisted_80","_hoisted_81","_hoisted_82","_hoisted_83","_hoisted_84","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_89","_hoisted_90","_hoisted_91","_$setup$form","_Fragment","loading","onSubmit","_withModifiers","args","submitForm","_withDirectives","placeholder","$event","form","_vModelText","v$","$error","_toDisplayString","$errors","$message","bedroom","bathroom","garage","loungeRoom","storey","area","width","length","formatPriceTrim","basePrice","onChange","e","updatePriceInput","perSQM","disabled","_renderList","HouseFeatures","feat","label","isSelected","updateFeatures","modelValue","inclusionName","isUploadingInclusion","for","id","target","onUploadFile","accept","inclusions","inclusion","onInclusionDelete","url","fileName","imagesToRender","image","data","index","onRemoveImageAndData","validsImagesNameInputs","includes","find","el","onNameChange","validImagesColorInputs","color","onColorChange","ImagesHouseTypes","FACADES","price","onPriceChange","onRemoveImage","isUploadingImage","onUploadImage","validsMultipleImagesInputs","addImage","filteredFacades","facade","facades","_id","updateFacades","onCreateHouse","router","go","isCropperModalOpen","imageToUpload","onOnCropImage","onCropImage","onClose","ref","toast","useToast","computed","filter","storeys","getEmptyImage","uuidv4","initMainImage","initFloorplans","initLounges","initKitchens","initBathrooms","MAIN_IMAGE","ImageHouseLabels","FLOORPLANS","KITCHENS","BATHROOMS","LOUNGES_ROOMS","formFields","floorplans","lounges","kitchens","bathrooms","features","mainImage","reactive","assign","rules","required","minValue","maxValue","useVuelidate","builderId","currentRoute","params","foundFacade","f","push","formatPrice","feature","uploadImageRequest","async","res","store","dispatch","formData","Location","setImagesUrl","error","validateMultipleImageInput","some","i","imageToRender","_imagesToRender$value","found","x","onDescriptionChange","description","files","reader","FileReader","readAsDataURL","onload","result","trim","FormData","append","then","filterDataRemoveImage","imageUrl","formatFormFields","types","values","formated","forEach","map","l","validateForm","_form$ImagesHouseType","_form$ImagesHouseType2","$touch","isValid","$validate","areFacadesErrors","clearForm","resetVuelidateErrors","formatedForm","quantity","urls","options","success","getBuilderFacades","file","onMounted","Floorplan","Inclusions","HouseFeature","ImageToRender","VuePictureCropper","cropper","ImageCropperModal","ImageToUpload","validImagesDescriptionInputs","ListItemGenerator","CheckboxInput","FacadeInterface"],"mappings":"iIAAA,W,oCCAA,W,2DCEA,MACMA,EAAa,CAAEC,MAAO,kBAEtB,SAAUC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQC,yBAAcC,yBAAaC,cAAW,CAAEC,GAAI,QAAU,CAC5DC,yBAAaC,gBAAa,CACxBC,KAAMV,EAAOW,eACbC,OAAQ,IACP,CACDC,QAASC,qBAAS,IAAM,CACrBd,EAAOe,QACHX,yBAAcY,gCAAoB,MAAO,CACxCC,IAAK,EACLrB,MAAOsB,4BAAgB,CAAC,QAASlB,EAAOmB,WACvC,CACDC,gCAAoB,MAAO,CACzBxB,MAAO,kBACPyB,QAASpB,EAAOqB,QAEjBtB,EAAOuB,eACHnB,yBAAcY,gCAAoB,MAAO,CACxCC,IAAK,EACLrB,MAAOsB,4BAAgB,CAAC,kCAAmC,CAAE,YAAajB,EAAOuB,MAAMC,aACtF,CACDL,gCAAoB,MAAOzB,EAAY,CACpCK,EAAO0B,WACHtB,yBAAcY,gCAAoB,MAAO,CACxCC,IAAK,EACLrB,MAAO,eACPyB,QAASpB,EAAOqB,SAElBK,gCAAoB,IAAI,GAC5BC,wBAAY9B,EAAK+B,OAAQ,UAAW,QAAIC,GAAW,MAEpD,IACHF,wBAAY9B,EAAK+B,OAAQ,UAAW,CAAEZ,IAAK,QAAKa,GAAW,IAC9D,IACHH,gCAAoB,IAAI,KAE9BI,EAAG,GACF,EAAG,CAAC,WCtCiBC,mCAAiB,CAC3CC,OA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,eAAiB,OAAOC,SAAY,eAAiB,OAAOC,SAAY,2BAA6B,OAAOuD,4BAAwB,mBAAqB,OAAOtD,SAAgB,wBAA0B,OAAOmE,SAAqB,cAAgB,OAAOC,SAAWC,gCAAmB,oBAAsB,OAAOC,qBAAiB,6BAA+B,OAAO/H,8BAA0B,6BAA+B,OAAOL,8BAA0B,mCAAqC,OAAOqI,oCAAgC,iCAAmC,OAAOtH,kCAA8BuH,gCAAmB,kBAAoB,OAAOjE,mBAAe,oBAAsB,OAAO5F,qBAAiB8J,4BAAe,aAAe,OAAOlG,SAAU,sBAAwB,OAAOmG,uBAAmB,sBAAwB,OAAOvK,uBAAmB,uBAAyB,OAAOI,yBAE79D,OADArI,OAAOC,eAAeF,EAAc,kBAAmB,CAAEG,YAAY,EAAOC,OAAO,IAC5EJ,K,oCCpaP,MAAMK,GAA2B,KAAgB,GAAQ,CAAC,CAAC,SAASjE,IAAQ,CAAC,YAAY,qBAE1E","file":"js/admin3.d991deee.js","sourcesContent":["export * from \"-!../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Modal.vue?vue&type=style&index=0&id=1e795cc8&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./AdminBuilderCreateHouse.vue?vue&type=style&index=0&id=60adfe65&lang=scss&scoped=true\"","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, Teleport as _Teleport, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1e795cc8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"modal--wrapper\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createVNode(_Transition, {\n name: $props.transitionName,\n appear: \"\"\n }, {\n default: _withCtx(() => [\n ($props.isOpen)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"modal\", $props.classes])\n }, [\n _createElementVNode(\"div\", {\n class: \"modal--backdrop\",\n onClick: $setup.close\n }),\n ($props.showContainer)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"modal--container scroll-wrapper\", { 'max-width': $setup.props.maxWidth }])\n }, [\n _createElementVNode(\"div\", _hoisted_1, [\n ($props.showClose)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"modal--close\",\n onClick: $setup.close\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"content\", {}, undefined, true)\n ])\n ], 2))\n : _renderSlot(_ctx.$slots, \"content\", { key: 1 }, undefined, true)\n ], 2))\n : _createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 8, [\"name\"])\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { onBeforeUnmount, watch } from \"vue\";\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Modal',\n props: {\n isOpen: { type: Boolean, default: false },\n showClose: { type: Boolean, default: true },\n showContainer: { type: Boolean, default: true },\n classes: { type: [String, Array], default: \"\" },\n transitionName: { type: String, default: \"fade\" },\n maxWidth: { type: Boolean, default: false },\n },\n emits: [\"close\", \"submit\"],\n setup(__props, { expose: __expose, emit }) {\n __expose();\n\nconst props = __props;\n\n \n \n\n watch(\n () => props.isOpen,\n () => {\n if (props.isOpen) {\n document.body.classList.add(\"no-scroll\");\n } else {\n document.body.classList.remove(\"no-scroll\");\n }\n },\n { immediate: true }\n );\n\n function close() {\n emit(\"close\");\n }\n\n const keyPress = (event: KeyboardEvent) => {\n if (event && event.code === \"Escape\") {\n close();\n }\n };\n document.addEventListener(\"keydown\", keyPress);\n\n onBeforeUnmount(() => {\n document.removeEventListener(\"keydown\", keyPress);\n document.body.classList.remove(\"no-scroll\");\n });\n\nconst __returned__ = { emit, props, close, keyPress, onBeforeUnmount, watch }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./Modal.vue?vue&type=template&id=1e795cc8&scoped=true&ts=true&lang=pug\"\nimport script from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./Modal.vue?vue&type=style&index=0&id=1e795cc8&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-1e795cc8\"]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vModelText as _vModelText, withDirectives as _withDirectives, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode, normalizeClass as _normalizeClass, createBlock as _createBlock, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\nimport _imports_0 from '@/assets/icons/icon-plus.svg'\nimport _imports_1 from '@/assets/icons/close.svg'\nimport _imports_2 from '@/assets/icons/pdf-icon.svg'\n\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-60adfe65\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"dashboard-header\" }, [\n /*#__PURE__*/_createElementVNode(\"h2\", { class: \"title-main\" }, \"Add House Design\")\n], -1))\nconst _hoisted_2 = {\n key: 0,\n class: \"spinner\"\n}\nconst _hoisted_3 = { class: \"card\" }\nconst _hoisted_4 = { class: \"input-row\" }\nconst _hoisted_5 = { class: \"input-wr w-50\" }\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Design Name\", -1))\nconst _hoisted_7 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_8 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"house-subtitle\" }, [\n /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Configuration:\")\n], -1))\nconst _hoisted_9 = { class: \"input-row\" }\nconst _hoisted_10 = { class: \"input-wr short\" }\nconst _hoisted_11 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_12 = { class: \"input-wr short\" }\nconst _hoisted_13 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_14 = { class: \"input-wr short\" }\nconst _hoisted_15 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_16 = { class: \"input-wr short\" }\nconst _hoisted_17 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_18 = { class: \"input-wr short\" }\nconst _hoisted_19 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"house-subtitle\" }, [\n /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Dimensions\")\n], -1))\nconst _hoisted_21 = { class: \"input-row\" }\nconst _hoisted_22 = { class: \"input-wr short\" }\nconst _hoisted_23 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_24 = { class: \"input-wr short\" }\nconst _hoisted_25 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_26 = { class: \"input-wr short\" }\nconst _hoisted_27 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_28 = { class: \"input-row\" }\nconst _hoisted_29 = { class: \"input-wr\" }\nconst _hoisted_30 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Base Price\", -1))\nconst _hoisted_31 = [\"value\", \"onChange\"]\nconst _hoisted_32 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_33 = { class: \"perSQM-wr\" }\nconst _hoisted_34 = { class: \"input-wr\" }\nconst _hoisted_35 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Per Square Metre\", -1))\nconst _hoisted_36 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"perSQM-text\" }, \"per SQM\", -1))\nconst _hoisted_37 = { class: \"card card-mt\" }\nconst _hoisted_38 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h4\", { class: \"subtitle-main\" }, \"Select Features\", -1))\nconst _hoisted_39 = { class: \"features-wr\" }\nconst _hoisted_40 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h4\", { class: \"subtitle-main\" }, \"Inclusions\", -1))\nconst _hoisted_41 = { class: \"input-row\" }\nconst _hoisted_42 = { class: \"input-wr inclusions-input-wr\" }\nconst _hoisted_43 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Range\", -1))\nconst _hoisted_44 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n src: _imports_0,\n alt: \"addImage\"\n}, null, -1))\nconst _hoisted_45 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \"Upload Brochure\", -1))\nconst _hoisted_46 = {\n key: 0,\n class: \"spinner spinner-small\"\n}\nconst _hoisted_47 = {\n key: 0,\n class: \"error-hint\"\n}\nconst _hoisted_48 = { class: \"inclusions-row\" }\nconst _hoisted_49 = { class: \"inclusion-label\" }\nconst _hoisted_50 = [\"onClick\"]\nconst _hoisted_51 = { class: \"inclusion-pdf\" }\nconst _hoisted_52 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", { src: _imports_2 }, null, -1))\nconst _hoisted_53 = { class: \"card card-mt\" }\nconst _hoisted_54 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h4\", { class: \"subtitle-main\" }, \"Gallery\", -1))\nconst _hoisted_55 = { class: \"images-list-wr\" }\nconst _hoisted_56 = { class: \"label\" }\nconst _hoisted_57 = { class: \"images-main-wr\" }\nconst _hoisted_58 = { class: \"image-section-wr\" }\nconst _hoisted_59 = {\n key: 0,\n class: \"remove-image-and-data-wr\"\n}\nconst _hoisted_60 = [\"onClick\"]\nconst _hoisted_61 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n src: _imports_1,\n alt: \"close\"\n}, null, -1))\nconst _hoisted_62 = [\n _hoisted_61\n]\nconst _hoisted_63 = { class: \"image-section\" }\nconst _hoisted_64 = { class: \"image-fields\" }\nconst _hoisted_65 = {\n key: 0,\n class: \"input-wr\"\n}\nconst _hoisted_66 = [\"value\", \"onChange\"]\nconst _hoisted_67 = {\n key: 1,\n class: \"input-wr\"\n}\nconst _hoisted_68 = [\"value\", \"onChange\"]\nconst _hoisted_69 = [\"value\", \"onChange\"]\nconst _hoisted_70 = {\n key: 2,\n class: \"input-wr\"\n}\nconst _hoisted_71 = [\"value\", \"onChange\"]\nconst _hoisted_72 = {\n key: 0,\n class: \"image-remove-wr\"\n}\nconst _hoisted_73 = [\"onClick\"]\nconst _hoisted_74 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n src: _imports_1,\n alt: \"close\"\n}, null, -1))\nconst _hoisted_75 = [\n _hoisted_74\n]\nconst _hoisted_76 = [\"src\"]\nconst _hoisted_77 = {\n key: 1,\n class: \"upload-image-wr\"\n}\nconst _hoisted_78 = { class: \"upload-image-button-wr\" }\nconst _hoisted_79 = [\"for\"]\nconst _hoisted_80 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n src: _imports_0,\n alt: \"uploadImage\"\n}, null, -1))\nconst _hoisted_81 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \"Upload image\", -1))\nconst _hoisted_82 = {\n key: 0,\n class: \"spinner spinner-small\"\n}\nconst _hoisted_83 = [\"id\", \"onChange\"]\nconst _hoisted_84 = { class: \"image-and-data-actions\" }\nconst _hoisted_85 = [\"onClick\"]\nconst _hoisted_86 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"img\", {\n class: \"button-pointer\",\n src: _imports_0,\n alt: \"addImage\"\n}, null, -1))\nconst _hoisted_87 = [\n _hoisted_86\n]\nconst _hoisted_88 = { class: \"select-facade-wr\" }\nconst _hoisted_89 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"label\", { class: \"label\" }, \"Facade Options\", -1))\nconst _hoisted_90 = { class: \"facade-options-wr\" }\nconst _hoisted_91 = { class: \"input-row\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _hoisted_1,\n ($setup.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"form\", {\n key: 1,\n class: \"default-form\",\n onSubmit: _cache[15] || (_cache[15] = _withModifiers(\n//@ts-ignore\n(...args) => (_ctx.submitForm && _ctx.submitForm(...args)), [\"prevent\"]))\n }, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _hoisted_6,\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Design Name\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (($setup.form.name) = $event))\n }, null, 512), [\n [_vModelText, $setup.form.name]\n ]),\n ($setup.v$.name.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, _toDisplayString($setup.v$.name.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _hoisted_8,\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Beds\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (($setup.form.bedroom) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.bedroom]\n ]),\n ($setup.v$.bedroom.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _toDisplayString($setup.v$.bedroom.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Baths\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (($setup.form.bathroom) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.bathroom]\n ]),\n ($setup.v$.bathroom.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, _toDisplayString($setup.v$.bathroom.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Cars\",\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (($setup.form.garage) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.garage]\n ]),\n ($setup.v$.garage.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, _toDisplayString($setup.v$.garage.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Living\",\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (($setup.form.loungeRoom) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.loungeRoom]\n ]),\n ($setup.v$.loungeRoom.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, _toDisplayString($setup.v$.loungeRoom.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Storeys\",\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (($setup.form.storey) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.storey]\n ]),\n ($setup.v$.storey.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, _toDisplayString($setup.v$.storey.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _hoisted_20,\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"div\", _hoisted_22, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Area\",\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => (($setup.form.area) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.area]\n ]),\n ($setup.v$.area.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_23, _toDisplayString($setup.v$.area.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_24, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Width\",\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => (($setup.form.width) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.width]\n ]),\n ($setup.v$.width.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_25, _toDisplayString($setup.v$.width.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_26, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Length\",\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event: any) => (($setup.form.length) = $event)),\n type: \"number\"\n }, null, 512), [\n [_vModelText, $setup.form.length]\n ]),\n ($setup.v$.length.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_27, _toDisplayString($setup.v$.length.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_28, [\n _createElementVNode(\"div\", _hoisted_29, [\n _hoisted_30,\n _createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"$350,000\",\n value: $setup.formatPriceTrim($setup.form?.basePrice),\n onChange: (e) => $setup.updatePriceInput(e, $setup.form, 'basePrice')\n }, null, 40, _hoisted_31),\n ($setup.v$.basePrice.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_32, _toDisplayString($setup.v$.basePrice.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_33, [\n _createElementVNode(\"div\", _hoisted_34, [\n _hoisted_35,\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input perSQM-input\",\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = ($event: any) => (($setup.perSQM) = $event)),\n type: \"text\",\n disabled: \"\"\n }, null, 512), [\n [_vModelText, $setup.perSQM]\n ])\n ]),\n _hoisted_36\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_37, [\n _hoisted_38,\n _createElementVNode(\"div\", _hoisted_39, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.HouseFeatures, (feat) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"features\",\n key: feat.name\n }, [\n _createVNode($setup[\"CheckboxInput\"], {\n label: feat.name,\n \"onUpdate:modelValue\": ($event: any) => ((feat.isSelected = !feat.isSelected), $setup.updateFeatures(feat)),\n modelValue: feat.isSelected\n }, null, 8, [\"label\", \"onUpdate:modelValue\", \"modelValue\"])\n ]))\n }), 128))\n ]),\n _hoisted_40,\n _createElementVNode(\"div\", _hoisted_41, [\n _createElementVNode(\"div\", _hoisted_42, [\n _hoisted_43,\n _withDirectives(_createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"Name\",\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = ($event: any) => (($setup.inclusionName) = $event))\n }, null, 512), [\n [_vModelText, $setup.inclusionName]\n ]),\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"upload-image-button\", { disabled: $setup.isUploadingInclusion }]),\n for: \"upload-inclusion\"\n }, [\n _hoisted_44,\n _hoisted_45,\n ($setup.isUploadingInclusion)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_46))\n : _createCommentVNode(\"\", true)\n ], 2),\n _createElementVNode(\"input\", {\n class: \"input\",\n id: \"upload-inclusion\",\n type: \"file\",\n onClick: _cache[11] || (_cache[11] = ($event: any) => ($event.target.value = '')),\n onChange: _cache[12] || (_cache[12] = ($event: any) => ($setup.onUploadFile($event))),\n accept: \"application/pdf\"\n }, null, 32),\n ($setup.v$.inclusions.$error)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_47, _toDisplayString($setup.v$.inclusions.$errors[0].$message), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_48, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.form.inclusions, (inclusion) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"inclusion\",\n key: inclusion.name\n }, [\n _createElementVNode(\"div\", _hoisted_49, [\n _createElementVNode(\"span\", null, _toDisplayString(inclusion.name), 1),\n _createElementVNode(\"img\", {\n src: _imports_1,\n onClick: ($event: any) => ($setup.onInclusionDelete(inclusion.url))\n }, null, 8, _hoisted_50)\n ]),\n _createElementVNode(\"div\", _hoisted_51, [\n _hoisted_52,\n _createElementVNode(\"span\", null, _toDisplayString(inclusion.fileName), 1)\n ])\n ]))\n }), 128))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_53, [\n _hoisted_54,\n _createElementVNode(\"div\", _hoisted_55, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.imagesToRender, (image) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: image.type\n }, [\n _createElementVNode(\"label\", _hoisted_56, _toDisplayString(image.label), 1),\n _createElementVNode(\"div\", _hoisted_57, [\n _createElementVNode(\"div\", _hoisted_58, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(image.data, ({id, url}, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"image-wr\",\n key: index\n }, [\n (image.data.length > 1 && index !== 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_59, [\n _createElementVNode(\"div\", {\n class: \"remove-image-and-data-button\",\n onClick: ($event: any) => ($setup.onRemoveImageAndData(image.type, id))\n }, _hoisted_62, 8, _hoisted_60)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_63, [\n _createElementVNode(\"figure\", _hoisted_64, [\n ($setup.validsImagesNameInputs.includes(image.type))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_65, [\n _createElementVNode(\"input\", {\n class: \"input name-picker\",\n placeholder: \"Name\",\n value: $setup.form[image.type].find((el) => el.id === id).name,\n onChange: ($event: any) => ($setup.onNameChange(image.type, id, $event.target.value))\n }, null, 40, _hoisted_66)\n ]))\n : _createCommentVNode(\"\", true),\n ($setup.validImagesColorInputs.includes(image.type))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_67, [\n _createElementVNode(\"input\", {\n class: \"color-picker\",\n type: \"color\",\n value: $setup.form[image.type].find((el) => el.id === id).color,\n onChange: ($event: any) => ($setup.onColorChange(image.type, id, $event.target.value))\n }, null, 40, _hoisted_68),\n _createElementVNode(\"input\", {\n class: \"input\",\n placeholder: \"#000000\",\n value: $setup.form[image.type].find((el) => el.id === id).color,\n onChange: ($event: any) => ($setup.onColorChange(image.type, id, $event.target.value))\n }, null, 40, _hoisted_69)\n ]))\n : _createCommentVNode(\"\", true),\n (image.type === $setup.ImagesHouseTypes.FACADES)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_70, [\n _createElementVNode(\"input\", {\n class: \"input price-picker\",\n placeholder: \"Price\",\n type: \"number\",\n value: $setup.form[image.type].find((el) => el.id === id).price,\n onChange: ($event: any) => ($setup.onPriceChange(image.type, id, $event.target.value))\n }, null, 40, _hoisted_71)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n url\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_72, [\n url\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"remove-image\",\n onClick: ($event: any) => ($setup.onRemoveImage(image.type, id))\n }, _hoisted_75, 8, _hoisted_73))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"img\", { src: url }, null, 8, _hoisted_76)\n ]))\n : _createCommentVNode(\"\", true),\n (!url)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_77, [\n _createElementVNode(\"div\", _hoisted_78, [\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"upload-image-button\", { disabled: $setup.isUploadingImage }]),\n for: `file-upload${id}`\n }, [\n _hoisted_80,\n _hoisted_81,\n ($setup.isUploadingImage)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_82))\n : _createCommentVNode(\"\", true)\n ], 10, _hoisted_79)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"input\", {\n class: \"input-file-upload-image\",\n id: `file-upload${id}`,\n type: \"file\",\n onClick: _cache[13] || (_cache[13] = ($event: any) => ($event.target.value = '')),\n onChange: ($event: any) => ($setup.onUploadImage($event, image.type, id)),\n accept: \"image/*\"\n }, null, 40, _hoisted_83)\n ]))\n }), 128)),\n _createElementVNode(\"div\", _hoisted_84, [\n ($setup.validsMultipleImagesInputs.includes(image.type))\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"add-image-button-wr\",\n onClick: ($event: any) => ($setup.addImage(image.type))\n }, _hoisted_87, 8, _hoisted_85))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]))\n }), 128)),\n _createElementVNode(\"div\", _hoisted_88, [\n _hoisted_89,\n _createElementVNode(\"div\", _hoisted_90, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.filteredFacades, (facade) => {\n return (_openBlock(), _createBlock($setup[\"CheckboxInput\"], {\n label: facade.name,\n modelValue: $setup.form.facades.includes(facade._id),\n class: _normalizeClass('facade-item'),\n \"onUpdate:modelValue\": ($event: any) => ($setup.updateFacades(facade))\n }, null, 8, [\"label\", \"modelValue\", \"onUpdate:modelValue\"]))\n }), 256))\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_91, [\n _createElementVNode(\"button\", {\n class: \"button default primary create-btn\",\n onClick: $setup.onCreateHouse,\n type: \"button\"\n }, \"Create\"),\n _createElementVNode(\"button\", {\n class: \"button default outlined cancel-btn\",\n onClick: _cache[14] || (_cache[14] = ($event: any) => ($setup.router.go(-1))),\n type: \"button\"\n }, \"Cancel\")\n ])\n ])\n ], 32)),\n _createVNode($setup[\"ImageCropperModal\"], {\n isOpen: $setup.isCropperModalOpen,\n image: $setup.imageToUpload.data,\n onOnCropImage: $setup.onCropImage,\n onClose: _cache[16] || (_cache[16] = ($event: any) => ($setup.isCropperModalOpen = false))\n }, null, 8, [\"isOpen\", \"image\"])\n ], 64))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { ref, reactive, computed, onMounted, watch } from \"vue\";\nimport store from \"@/store\";\nimport router from \"@/router\";\nimport { ImagesHouseTypes, ImageHouseLabels} from \"@/enums/BuilderHouseImages\";\nimport { Floorplan, Inclusions, HouseFeature } from \"@/types/HouseDesignInterface\";\nimport { ImageToRender } from \"@/types/HouseCreateImageToRender\";\nimport { useToast } from \"vue-toastification\";\nimport { required, minValue, maxValue } from \"@vuelidate/validators\";\nimport { resetVuelidateErrors } from \"@/helpers/vuelidate\";\nimport useVuelidate from \"@vuelidate/core\";\nimport VuePictureCropper, { cropper } from \"vue-picture-cropper\";\nimport ImageCropperModal from \"@/components/ui/modals/ImageCropperModal.vue\";\nimport { ImageToUpload } from \"@/types/BuilderImageToUpload\";\nimport {\n validImagesColorInputs,\n validsImagesNameInputs,\n validImagesDescriptionInputs,\n validsMultipleImagesInputs,\n} from \"@/constants/adminHouseInputs\";\nimport ListItemGenerator from \"@/components/builder/ListItemGenerator.vue\";\nimport { formatPrice } from \"@/helpers/transformation/price\";\nimport { HouseFeatures } from \"@/constants/houseFeatures\";\nimport CheckboxInput from \"@/components/ui/input/CheckboxInput.vue\";\nimport { v4 as uuidv4 } from 'uuid';\nimport { FacadeInterface } from \"@/types/FacadeInterface\";\nimport { formatPriceTrim, updatePriceInput } from \"@/helpers/transformation/price\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminBuilderCreateHouse',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst imageToUpload = ref({\n id: '',\n data: null,\n type: \"\" as ImagesHouseTypes,\n});\nconst isCropperModalOpen = ref(false);\nconst toast = useToast();\n\nconst facades = ref([]);\nconst filteredFacades = computed(() => {\n return facades.value.filter((facade) => facade.storeys === form.storey);\n})\nconst loading = ref(false);\nconst isUploadingImage = ref(false);\nconst isUploadingInclusion = ref(false);\nconst inclusionName = ref(\"\");\n\nconst getEmptyImage = () => {\n return [{ id: uuidv4(), url: ''}]\n}\n\nconst initMainImage = getEmptyImage();\nconst initFloorplans = getEmptyImage();\nconst initLounges = getEmptyImage();\nconst initKitchens = getEmptyImage();\nconst initBathrooms = getEmptyImage();\n\nconst imagesToRender = ref([\n {\n type: ImagesHouseTypes.MAIN_IMAGE,\n data: initMainImage,\n label: ImageHouseLabels.MAIN_IMAGE,\n },\n {\n type: ImagesHouseTypes.FLOORPLANS,\n data: initFloorplans,\n label: ImageHouseLabels.FLOORPLANS,\n },\n {\n type: ImagesHouseTypes.KITCHENS,\n data: initKitchens,\n label: ImageHouseLabels.KITCHENS,\n },\n {\n type: ImagesHouseTypes.BATHROOMS,\n data: initBathrooms,\n label: ImageHouseLabels.BATHROOMS,\n },\n {\n type: ImagesHouseTypes.LOUNGES_ROOMS,\n data: initLounges,\n label: ImageHouseLabels.LOUNGES_ROOMS,\n },\n]);\n\nconst formFields = {\n facades: [] as string[],\n floorplans: initFloorplans as Record[],\n lounges: initLounges as Record[],\n kitchens: initKitchens as Record[],\n bathrooms: initBathrooms as Record[],\n inclusions: [] as Inclusions[],\n features: [] as string[],\n mainImage: initMainImage as Record[],\n name: \"\",\n area: null,\n length: null,\n width: null,\n bathroom: null,\n bedroom: null,\n garage: null,\n storey: null,\n loungeRoom: null,\n basePrice: null,\n};\n\nconst form = reactive(Object.assign({}, formFields));\n\nconst rules = {\n facades: { required },\n floorplans: { required },\n features: { },\n lounges: { required },\n kitchens: { required },\n bathrooms: { required },\n inclusions: { },\n name: { required },\n area: { required, minValue: minValue(1) },\n length: { required, minValue: minValue(1) },\n width: { required, minValue: minValue(1) },\n bathroom: { required, minValue: minValue(1) },\n bedroom: { required, minValue: minValue(1) },\n garage: { required, minValue: minValue(1) },\n storey: { required, minValue: minValue(1), maxValue: maxValue(2) },\n loungeRoom: { required, minValue: minValue(1) },\n basePrice: { },\n mainImage: { required },\n};\n\nconst v$ = useVuelidate(rules, form);\n\nconst builderId = computed(() => {\n return router.currentRoute.value.params.builderId;\n});\n\nconst updateFacades = (facade: FacadeInterface) => {\n const foundFacade = form.facades.includes(facade._id);\n\n if(!foundFacade) form.facades.push(facade._id);\n else form.facades = form.facades.filter(f => f !== facade._id);\n}\n\nconst perSQM = computed(() => {\n return !form.basePrice || !form.area ? '$0' : `${formatPrice(form.basePrice / form.area)}`;\n})\n\nconst updateFeatures = (feature : HouseFeature) => {\n if(feature.isSelected){\n form.features.push(feature.name);\n }\n else{\n form.features = form.features.filter(f => f !== feature.name)\n };\n}\n\nconst uploadImageRequest = async (formData: FormData) => {\n isUploadingImage.value = true;\n try {\n const res = await store.dispatch(\"builder/uploadHouseImages\", {\n formData,\n builderId: builderId.value,\n });\n const url = res.data[0].value.Location;\n setImagesUrl(imageToUpload.value.type, url, imageToUpload.value.id);\n } catch (error) {\n toast.error(\"An error occurred while uploading the image\");\n } finally {\n isUploadingImage.value = false;\n }\n};\n\nconst validateMultipleImageInput = (data: string[], type: ImagesHouseTypes, url : string) => {\n if(data[data.length - 1] === url && validsMultipleImagesInputs.includes(type)){\n return true;\n }\n return false;\n}\n\nconst addImage = (type : ImagesHouseTypes) => {\n const image = getEmptyImage()[0];\n\n if(!form[type].some(i => i.id === image.id)){\n form[type].push(image);\n }\n\n const imageToRender = imagesToRender.value.find((image) => image.type === type);\n\n if(imageToRender && !imageToRender.data.some(i => i.id === image.id)){\n imageToRender.data.push(image);\n }\n\n}\n\nconst setImagesUrl = (type: ImagesHouseTypes, url: string, id: string) => {\n const found = form[type].find(x => x.id === id);\n if(found) { found.id = id; }\n\n const imageToRender = imagesToRender.value\n .find((image) => image.type === type)?.data\n .find((url) => url.id === id);\n\n if(imageToRender){\n imageToRender.url = url;\n }\n};\n\n\nconst onNameChange = (type: ImagesHouseTypes, id: string, name: string) => {\n form[type].find((el: { id: string }) => el.id === id).name = name;\n};\n\nconst onDescriptionChange = (\n type: ImagesHouseTypes,\n id: string,\n description: string\n) => {\n form[type].find((el: { id: string}) => el.id === id).description =\n description;\n};\n\nconst onColorChange = (type: ImagesHouseTypes, id: string, color: string) => {\n form[type].find((el: { id: string }) => el.id === id).color = color;\n};\nconst onPriceChange = (type: ImagesHouseTypes, id: string, price: string) => {\n form[type].find((el: { id: string }) => el.id === id).price = price;\n};\n\nconst onUploadImage = (e: InputEvent, type: ImagesHouseTypes, id: string): void => {\n const files = (e.target as HTMLInputElement).files as FileList;\n if (!files[0]) {\n return;\n }\n imageToUpload.value.id = id;\n imageToUpload.value.type = type;\n imageToUpload.value.data = \"\";\n const reader = new FileReader();\n reader.readAsDataURL(files[0]);\n reader.onload = () => {\n imageToUpload.value.data = reader.result as string;\n isCropperModalOpen.value = true;\n };\n};\n\nconst onUploadFile = async (e: InputEvent) => {\n if (inclusionName.value.trim() === \"\") {\n toast.error(\"Please enter an inclusion name first\");\n return;\n }\n const files = (e.target as HTMLInputElement).files as FileList;\n if (!files[0]) {\n return;\n }\n const formData = new FormData();\n formData.append(\"file\", files[0]);\n try {\n isUploadingInclusion.value = true;\n await store\n .dispatch(\"builder/uploadHouseFile\", {\n formData,\n builderId: builderId.value,\n })\n .then((res) => {\n form.inclusions.push({\n name: inclusionName.value,\n url: res.data,\n fileName: files[0].name,\n });\n inclusionName.value = \"\";\n });\n } catch (error) {\n toast.error(\"An error occurred while uploading the inclusion file\");\n } finally {\n isUploadingInclusion.value = false;\n }\n};\n\nconst onInclusionDelete = (url: string) => {\n form.inclusions = form.inclusions.filter((el) => el.url !== url);\n};\n\n\nconst onRemoveImageAndData = (type : ImagesHouseTypes, id : string) => {\n form[type] = form[type].filter(x => x.id !== id);\n\n const imageToRender = imagesToRender.value.find((image) => image.type === type)\n\n if(imageToRender){\n imageToRender.data = imageToRender.data.filter(x => x.id !== id)\n }\n}\n\nconst onRemoveImage = (type: ImagesHouseTypes, id: string) => {\n setImagesUrl(type, '', id)\n};\n\nconst filterDataRemoveImage = (data : string[], url: string) => {\n if(data.length === 1){\n return [''];\n }\n return data.filter((imageUrl) => imageUrl !== url)\n}\n\nconst formatFormFields = () => {\n\n const types = Object.values(ImagesHouseTypes);\n\n const formated = { ...form };\n\n types.forEach((type) => {\n for (var i = 0; i < formated[type].length; i++) {\n delete formated[type][i].id;\n }\n })\n\n return {\n ...formated,\n lounges: form.lounges.map(l => l.url),\n mainImage: form.mainImage[0].url,\n };\n}\n\nconst validateForm = async () => {\n v$.value.$touch();\n\n const isValid = await v$.value.$validate();\n\n const areFacadesErrors = form.facades.length <= 0;\n\n if (!isValid) {\n toast.error(\"Please fill the required fields\");\n return false;\n }\n\n if (!form[ImagesHouseTypes.MAIN_IMAGE][0]?.url) {\n toast.error(\"Please upload a main image\");\n return false;\n }\n\n if (!form[ImagesHouseTypes.FLOORPLANS][0]?.url) {\n toast.error(\"Please upload a floorplan image\");\n return false;\n }\n\n if (areFacadesErrors) {\n toast.error(\"Please select at least one facade\");\n return false;\n }\n\n return true;\n};\nconst clearForm = () => {\n Object.assign(form, formFields);\n resetVuelidateErrors(v$);\n imagesToRender.value = imagesToRender.value.map((image) => ({\n type: image.type,\n label: image.label,\n data: [],\n }));\n};\nconst onCreateHouse = async () => {\n const isValid = await validateForm();\n if (!isValid) {\n return;\n }\n\n loading.value = true;\n const formatedForm = formatFormFields();\n try {\n await store.dispatch(\"builder/createHouse\", {\n ...formatedForm,\n builderId: builderId.value,\n loungeRoom: {\n quantity: formatedForm.loungeRoom,\n urls: formatedForm.lounges,\n },\n bathroom: {\n quantity: formatedForm.bathroom,\n options: formatedForm.bathrooms,\n },\n });\n toast.success(\"House created successfully\");\n clearForm();\n router.push({\n name: \"AdminBuilder\",\n params: { builderId: builderId.value },\n });\n } catch (error) {\n toast.error(\"An error occurred while creating the house\");\n } finally {\n loading.value = false;\n }\n};\n\nconst getBuilderFacades = async () => {\n loading.value = true;\n try {\n const data = await store.dispatch(\"facade/getFacadesByQuery\", {\n builderId: builderId.value,\n });\n facades.value = data;\n } catch (error) {\n toast.error(\"An error occurred while getting builder\");\n } finally {\n loading.value = false;\n }\n};\n\nasync function onCropImage(file: File) {\n isCropperModalOpen.value = false;\n imageToUpload.value.data = file;\n const formData = new FormData();\n formData.append(\"files\", file);\n uploadImageRequest(formData);\n}\n\nonMounted(() => getBuilderFacades())\n\nwatch(() => form.storey, () => {\n form.facades = [];\n})\n\nconst __returned__ = { imageToUpload, isCropperModalOpen, toast, facades, filteredFacades, loading, isUploadingImage, isUploadingInclusion, inclusionName, getEmptyImage, initMainImage, initFloorplans, initLounges, initKitchens, initBathrooms, imagesToRender, formFields, form, rules, v$, builderId, updateFacades, perSQM, updateFeatures, uploadImageRequest, validateMultipleImageInput, addImage, setImagesUrl, onNameChange, onDescriptionChange, onColorChange, onPriceChange, onUploadImage, onUploadFile, onInclusionDelete, onRemoveImageAndData, onRemoveImage, filterDataRemoveImage, formatFormFields, validateForm, clearForm, onCreateHouse, getBuilderFacades, onCropImage, ref, reactive, computed, onMounted, watch, get store() { return store }, get router() { return router }, get ImagesHouseTypes() { return ImagesHouseTypes }, get ImageHouseLabels() { return ImageHouseLabels }, get Floorplan() { return Floorplan }, get Inclusions() { return Inclusions }, get HouseFeature() { return HouseFeature }, get ImageToRender() { return ImageToRender }, get useToast() { return useToast }, get required() { return required }, get minValue() { return minValue }, get maxValue() { return maxValue }, get resetVuelidateErrors() { return resetVuelidateErrors }, get useVuelidate() { return useVuelidate }, get VuePictureCropper() { return VuePictureCropper }, get cropper() { return cropper }, ImageCropperModal, get ImageToUpload() { return ImageToUpload }, get validImagesColorInputs() { return validImagesColorInputs }, get validsImagesNameInputs() { return validsImagesNameInputs }, get validImagesDescriptionInputs() { return validImagesDescriptionInputs }, get validsMultipleImagesInputs() { return validsMultipleImagesInputs }, ListItemGenerator, get formatPrice() { return formatPrice }, get HouseFeatures() { return HouseFeatures }, CheckboxInput, get uuidv4() { return uuidv4 }, get FacadeInterface() { return FacadeInterface }, get formatPriceTrim() { return formatPriceTrim }, get updatePriceInput() { return updatePriceInput } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminBuilderCreateHouse.vue?vue&type=template&id=60adfe65&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminBuilderCreateHouse.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminBuilderCreateHouse.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminBuilderCreateHouse.vue?vue&type=style&index=0&id=60adfe65&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-60adfe65\"]])\n\nexport default __exports__"],"sourceRoot":""}