(window["aioseopjsonp"]=window["aioseopjsonp"]||[]).push([["tools-partials-BackupSettings-vue"],{1407:function(t,e,s){"use strict";s.r(e);var c=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("core-card",{staticClass:"aioseo-backup-settings",attrs:{slug:"backupSettings",toggles:!1,"no-slide":"","header-text":t.strings.backupSettings},scopedSlots:t._u([{key:"header-icon",fn:function(){return[s("svg-history")]},proxy:!0}])},[t.backupsDeleteSuccess?s("core-alert",{attrs:{type:"green"}},[t._v(" "+t._s(t.strings.backupSuccessfullyDeleted)+" ")]):t._e(),t.backupsRestoreSuccess?s("core-alert",{attrs:{type:"green"}},[t._v(" "+t._s(t.strings.backupSuccessfullyRestored)+" ")]):t._e(),t.backups.length?t._e():s("div",{staticClass:"aioseo-section-description"},[t._v(" "+t._s(t.strings.noBackups)+" ")]),t.backups.length?[s("div",{staticClass:"backups-table"},[s("div",{staticClass:"backups-rows"},t._l(t.backups,(function(e,c){return s("div",{key:c,staticClass:"backup-row",class:{even:0===c%2}},[s("div",{staticClass:"backup-name",domProps:{innerHTML:t._s(t.getBackupName(e))}}),s("div",{staticClass:"backup-actions"},[s("core-tooltip",{attrs:{type:"action"},scopedSlots:t._u([{key:"tooltip",fn:function(){return[t._v(" "+t._s(t.strings.restore)+" ")]},proxy:!0}],null,!0)},[s("svg-refresh",{nativeOn:{click:function(s){return t.processRestoreBackup(e)}}})],1),s("core-tooltip",{attrs:{type:"action"},scopedSlots:t._u([{key:"tooltip",fn:function(){return[t._v(" "+t._s(t.strings.delete)+" ")]},proxy:!0}],null,!0)},[s("svg-trash",{nativeOn:{click:function(s){return t.processDeleteBackup(e)}}})],1)],1)])})),0)])]:t._e(),s("base-button",{attrs:{type:"blue",size:"medium",loading:t.loading},on:{click:t.processCreateBackup}},[s("svg-circle-plus"),t._v(" "+t._s(t.strings.createBackup)+" ")],1)],2)},a=[],u=s("5530"),i=s("2f62"),o={data:function(){return{timeout:null,backupsDeleteSuccess:!1,backupsRestoreSuccess:!1,loading:!1,strings:{backupSettings:this.$t.__("Backup Settings",this.$td),noBackups:this.$t.__("You have no saved backups.",this.$td),createBackup:this.$t.__("Create Backup",this.$td),restore:this.$t.__("Restore",this.$td),delete:this.$t.__("Delete",this.$td),backupSuccessfullyDeleted:this.$t.__("Success! The backup was deleted.",this.$td),backupSuccessfullyRestored:this.$t.__("Success! The backup was restored.",this.$td)}}},computed:Object(u["a"])({},Object(i["e"])(["backups"])),methods:Object(u["a"])(Object(u["a"])({},Object(i["b"])(["createBackup","deleteBackup","restoreBackup"])),{},{processCreateBackup:function(){var t=this;this.loading=!0,this.createBackup().then((function(){t.loading=!1}))},processDeleteBackup:function(t){var e=this;this.loading=!0,this.deleteBackup(t).then((function(){clearTimeout(e.timeout),e.loading=!1,e.backupsDeleteSuccess=!0,e.timeout=setTimeout((function(){e.backupsDeleteSuccess=!1,e.backupsRestoreSuccess=!1}),3e3)}))},processRestoreBackup:function(t){var e=this;this.loading=!0,this.restoreBackup(t).then((function(){clearTimeout(e.timeout),e.loading=!1,e.backupsRestoreSuccess=!0,e.timeout=setTimeout((function(){e.backupsDeleteSuccess=!1,e.backupsRestoreSuccess=!1}),3e3)}))},getBackupName:function(t){return this.$t.sprintf(this.$t.__("%1$s at %2$s",this.$td),"<strong>"+this.$moment(1e3*t).tz(this.$moment.tz.guess()).format("MMMM D, YYYY")+"</strong>","<strong>"+this.$moment(1e3*t).tz(this.$moment.tz.guess()).format("h:mmA z")+"</strong>")}})},n=o,r=(s("da9b"),s("2877")),p=Object(r["a"])(n,c,a,!1,null,null,null);e["default"]=p.exports},da9b:function(t,e,s){"use strict";var c=s("e04a"),a=s.n(c);a.a},e04a:function(t,e,s){}}]);