(window.webpackJsonp=window.webpackJsonp||[]).push([[99],{1092:function(t,e,o){"use strict";o.r(e);o(17),o(8);var n={props:{library:{type:Object,default:function(){return null}},libraryId:String,processing:Boolean},data:function(){return{}},computed:{librarySettings:function(){return this.library.settings||{}},mediaType:function(){return this.library.mediaType},isBookLibrary:function(){return"book"===this.mediaType}},methods:{removeAllMetadataClick:function(t){var e=this,o={message:this.$getString("MessageConfirmRemoveMetadataFiles",[t]),persistent:!0,callback:function(o){o&&e.removeAllMetadataInLibrary(t)},type:"yesNo"};this.$store.commit("globals/setConfirmPrompt",o)},removeAllMetadataInLibrary:function(t){var e=this;this.$emit("update:processing",!0),this.$axios.$post("/api/libraries/".concat(this.libraryId,"/remove-metadata?ext=").concat(t)).then((function(data){data.found?data.removed?e.$toast.success(e.$getString("ToastMetadataFilesRemovedSuccess",[data.removed,t])):e.$toast.success(e.$getString("ToastMetadataFilesRemovedNoneRemoved",[t])):e.$toast.info(e.$getString("ToastMetadataFilesRemovedNoneFound",[t]))})).catch((function(o){console.error("Failed to remove metadata files",o),e.$toast.error(e.$getString("ToastMetadataFilesRemovedError",[t]))})).finally((function(){e.$emit("update:processing",!1)}))}},mounted:function(){}},r=o(4),component=Object(r.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-full h-full px-1 md:px-2 py-1 mb-4"},[e("div",{staticClass:"w-full border border-black-200 p-4 my-8"},[e("div",{staticClass:"flex flex-wrap items-center"},[e("div",[e("p",{staticClass:"text-lg"},[t._v(t._s(t.$strings.LabelRemoveMetadataFile))]),t._v(" "),e("p",{staticClass:"max-w-sm text-sm pt-2 text-gray-300"},[t._v(t._s(t.$getString("LabelRemoveMetadataFileHelp",[t.mediaType])))])]),t._v(" "),e("div",{staticClass:"grow"}),t._v(" "),e("div",[e("ui-btn",{staticClass:"mb-4 block",on:{click:function(e){return e.stopPropagation(),t.removeAllMetadataClick("json")}}},[t._v(t._s(t.$strings.LabelRemoveAllMetadataJson))]),t._v(" "),e("ui-btn",{on:{click:function(e){return e.stopPropagation(),t.removeAllMetadataClick("abs")}}},[t._v(t._s(t.$strings.LabelRemoveAllMetadataAbs))])],1)])])])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{UiBtn:o(42).default})}}]);