{"version":3,"sources":["webpack:///src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue?bc86","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue?82b0","webpack:///./src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue?e412"],"names":["components","props","showModal","type","Boolean","default","onClickCancel","Function","required","data","isSaving","isSavingSuccess","isSavingError","mLocation","computed","_objectSpread","mapState","created","JSON","parse","stringify","location","methods","mapMutations","saveLocation","self","locationProvider","saveLocationSocialMediaAccounts","Id","SocialMediaAccounts","then","response","status","setLocation","setTimeout","catch","error","finally","render","_vm","_c","_self","attrs","modalTitle","$t","hideFooterButtons","onClickSave","on","closeModal","scopedSlots","_u","key","fn","staticClass","_l","account","index","_v","_s","Name","Url","replace","directives","name","rawName","value","Value","expression","domProps","input","$event","target","composing","$set","href","icon","_e","proxy","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA;AACA;AACA;AACA;AAEe;EACfA,UAAA;EAEAC,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;MACAH,IAAA,EAAAI,QAAA;MACAC,QAAA;IACA;EACA;EAEAC,IAAA,WAAAA,KAAA;IACA;MACAC,QAAA;MACAC,eAAA;MACAC,aAAA;MACAC,SAAA;IACA;EACA;EAEAC,QAAA,EAAAC,iIAAA,KACAC,6DAAA,gCACA;EAEAC,OAAA,WAAAA,QAAA;IACA,KAAAJ,SAAA,GAAAK,IAAA,CAAAC,KAAA,CAAAD,IAAA,CAAAE,SAAA,MAAAC,QAAA;EACA;EAEAC,OAAA,EAAAP,iIAAA,CAAAA,iIAAA,KACAQ,iEAAA;IAEAC,YAAA,WAAAA,aAAA;MACA,IAAAC,IAAA;MACAA,IAAA,CAAAf,QAAA;MAEAg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,CAACC,MAAM,CAACN,KAAK,CAAC;cACjD;YACF;UACF,CAAC,CAAC,CACH,CAAC,EACFzB,EAAE,CAAC,IAAI,EAAE,CACPe,OAAO,CAACW,KAAK,GACT1B,EAAE,CACA,GAAG,EACH;YACEa,WAAW,EAAE,UAAU;YACvBX,KAAK,EAAE;cACLgC,IAAI,EAAEnB,OAAO,CAACK,GAAG,CAACC,OAAO,CACvB,WAAW,EACXN,OAAO,CAACW,KACV,CAAC;cACDK,MAAM,EAAE;YACV;UACF,CAAC,EACD,CACE/B,EAAE,CACA,MAAM,EACN;YAAEa,WAAW,EAAE;UAAO,CAAC,EACvB,CACEb,EAAE,CAAC,mBAAmB,EAAE;YACtBE,KAAK,EAAE;cAAEiC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM;YAAE;UACjC,CAAC,CAAC,CACH,EACD,CACF,CAAC,CAEL,CAAC,GACDpC,GAAG,CAACqC,EAAE,CAAC,CAAC,CACb,CAAC,CACH,CAAC;QACJ,CACF,CAAC,EACD,CACF,CAAC,CACF,CAAC,CACH;MACH,CAAC;MACDC,KAAK,EAAE;IACT,CAAC,CACF;EACH,CAAC,CAAC;AACJ,CAAC;AACD,IAAIC,eAAe,GAAG,EAAE;AACxBxC,MAAM,CAACyC,aAAa,GAAG,IAAI;;;;;;;;;;;;;;AC9G3B;AAAA;AAAA;AAAA;AAAkG;AAC3B;AACL;;;AAGlE;AACmG;AACnG,gBAAgB,mHAAU;AAC1B,EAAE,iGAAM;AACR,EAAE,sGAAM;AACR,EAAE,+GAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAAoU,CAAgB,sVAAG,EAAC,C;;;;;;;;;;;;;ACAxV;AAAA;AAAA;AAAA;AAAA","file":"js/411.js?id=742381ca4a24fb0506ed","sourcesContent":["<template>\n  <ui-component-modal\n    :modalTitle=\"\n      $t(\n        'Components.Settings.Location.BasicInformation.SocialMedia.Modal.Main_Title'\n      )\n    \"\n    :isSaving=\"isSaving\"\n    :isSavingSuccess=\"isSavingSuccess\"\n    :isSavingError=\"isSavingError\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"saveLocation\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template v-slot:content>\n      <table class=\"table is-striped is-fullwidth\">\n        <tbody>\n          <tr\n            v-for=\"(account, index) in mLocation.SocialMediaAccounts\"\n            :key=\"index\"\n          >\n            <td>\n              <div>{{ account.Name }}</div>\n              <div\n                class=\"is-size-7 has-text-weight-light is-italic has-text-grey\"\n              >\n                {{ account.Url.replace('##value##', '') }}\n              </div>\n            </td>\n            <td>\n              <input type=\"text\" v-model=\"account.Value\" class=\"input\" />\n            </td>\n            <td>\n              <a\n                v-if=\"account.Value\"\n                :href=\"account.Url.replace('##value##', account.Value)\"\n                target=\"_blank\"\n                class=\"has-icon\"\n              >\n                <span class=\"icon\">\n                  <font-awesome-icon :icon=\"['fas', 'link']\" />\n                </span>\n              </a>\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport locationProvider from '@/providers/location'\n\nexport default {\n  components: {},\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n  },\n\n  data() {\n    return {\n      isSaving: false,\n      isSavingSuccess: false,\n      isSavingError: false,\n      mLocation: null,\n    }\n  },\n\n  computed: {\n    ...mapState('locationStore', ['location']),\n  },\n\n  created() {\n    this.mLocation = JSON.parse(JSON.stringify(this.location))\n  },\n\n  methods: {\n    ...mapMutations('locationStore', ['setLocation']),\n\n    saveLocation() {\n      let self = this\n      self.isSaving = true\n\n      locationProvider.methods\n        .saveLocationSocialMediaAccounts(\n          self.location.Id,\n          self.mLocation.SocialMediaAccounts\n        )\n        .then((response) => {\n          if (response.status === 204) {\n            self.setLocation(self.mLocation)\n\n            self.isSavingSuccess = true\n\n            setTimeout(() => {\n              self.onClickCancel()\n            }, 1000)\n          }\n        })\n        .catch((error) => {\n          self.isSavingError = true\n        })\n        .finally(() => {\n          self.isSaving = false\n        })\n    },\n  },\n}\n</script>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\"ui-component-modal\", {\n    attrs: {\n      modalTitle: _vm.$t(\n        \"Components.Settings.Location.BasicInformation.SocialMedia.Modal.Main_Title\"\n      ),\n      isSaving: _vm.isSaving,\n      isSavingSuccess: _vm.isSavingSuccess,\n      isSavingError: _vm.isSavingError,\n      hideFooterButtons: _vm.isSavingError || _vm.isSavingSuccess,\n      onClickCancel: _vm.onClickCancel,\n      onClickSave: _vm.saveLocation,\n      showModal: _vm.showModal,\n    },\n    on: { closeModal: _vm.onClickCancel },\n    scopedSlots: _vm._u([\n      {\n        key: \"content\",\n        fn: function () {\n          return [\n            _c(\"table\", { staticClass: \"table is-striped is-fullwidth\" }, [\n              _c(\n                \"tbody\",\n                _vm._l(\n                  _vm.mLocation.SocialMediaAccounts,\n                  function (account, index) {\n                    return _c(\"tr\", { key: index }, [\n                      _c(\"td\", [\n                        _c(\"div\", [_vm._v(_vm._s(account.Name))]),\n                        _c(\n                          \"div\",\n                          {\n                            staticClass:\n                              \"is-size-7 has-text-weight-light is-italic has-text-grey\",\n                          },\n                          [\n                            _vm._v(\n                              \" \" +\n                                _vm._s(account.Url.replace(\"##value##\", \"\")) +\n                                \" \"\n                            ),\n                          ]\n                        ),\n                      ]),\n                      _c(\"td\", [\n                        _c(\"input\", {\n                          directives: [\n                            {\n                              name: \"model\",\n                              rawName: \"v-model\",\n                              value: account.Value,\n                              expression: \"account.Value\",\n                            },\n                          ],\n                          staticClass: \"input\",\n                          attrs: { type: \"text\" },\n                          domProps: { value: account.Value },\n                          on: {\n                            input: function ($event) {\n                              if ($event.target.composing) return\n                              _vm.$set(account, \"Value\", $event.target.value)\n                            },\n                          },\n                        }),\n                      ]),\n                      _c(\"td\", [\n                        account.Value\n                          ? _c(\n                              \"a\",\n                              {\n                                staticClass: \"has-icon\",\n                                attrs: {\n                                  href: account.Url.replace(\n                                    \"##value##\",\n                                    account.Value\n                                  ),\n                                  target: \"_blank\",\n                                },\n                              },\n                              [\n                                _c(\n                                  \"span\",\n                                  { staticClass: \"icon\" },\n                                  [\n                                    _c(\"font-awesome-icon\", {\n                                      attrs: { icon: [\"fas\", \"link\"] },\n                                    }),\n                                  ],\n                                  1\n                                ),\n                              ]\n                            )\n                          : _vm._e(),\n                      ]),\n                    ])\n                  }\n                ),\n                0\n              ),\n            ]),\n          ]\n        },\n        proxy: true,\n      },\n    ]),\n  })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ModalEditSocialMedia.vue?vue&type=template&id=8bc60fba\"\nimport script from \"./ModalEditSocialMedia.vue?vue&type=script&lang=js\"\nexport * from \"./ModalEditSocialMedia.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/github/workspace/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('8bc60fba')) {\n      api.createRecord('8bc60fba', component.options)\n    } else {\n      api.reload('8bc60fba', component.options)\n    }\n    module.hot.accept(\"./ModalEditSocialMedia.vue?vue&type=template&id=8bc60fba\", function () {\n      api.rerender('8bc60fba', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Settings/Location/BasicInformation/ModalEditSocialMedia.vue\"\nexport default component.exports","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalEditSocialMedia.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalEditSocialMedia.vue?vue&type=script&lang=js\"","export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"381a4baa-vue-loader-template\\\"}!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalEditSocialMedia.vue?vue&type=template&id=8bc60fba\""],"sourceRoot":""}