import{_ as u}from"./js/_plugin-vue_export-helper.3febc96a.js";import{o as d,c as m,a as i,J as _,Q as f,b as l,x as w,E as h}from"./js/vue.runtime.esm-bundler.f433d23f.js";import{l as g}from"./js/index.c9841ea4.js";import{l as x}from"./js/index.57ad6f19.js";import{l as P}from"./js/index.0b123ab1.js";import{i as S,t as r,l as b}from"./js/links.96ffe3f0.js";import{e as E}from"./js/elemLoaded.9a6eb745.js";import{s as k}from"./js/postContent.2b412d8b.js";import"./js/translations.f6b76bbe.js";import"./js/default-i18n.41786823.js";import"./js/constants.008ef172.js";import"./js/Caret.b5c2e4ec.js";import"./js/isArrayLikeObject.7c69e632.js";import"./js/cleanForSlug.b54907fb.js";import"./js/toString.9a2ec6a1.js";import"./js/_baseTrim.8725856f.js";import"./js/_stringToArray.4de3b1f3.js";import"./js/deburr.40d916cf.js";import"./js/html.51334e3e.js";import"./js/get.5bf9ffd1.js";const y={setup(){return{postEditorStore:S()}},emits:["standalone-update-post"],data(){return{strings:{label:this.$t.__("Don't update the modified date",this.$td)}}},methods:{addLimitModifiedDateAttribute(){r()&&window.wp.data.dispatch("core/editor").editPost({aioseo_limit_modified_date:this.postEditorStore.currentPost.limit_modified_date})}},computed:{canShowSvg(){return r()&&this.postEditorStore.currentPost.limit_modified_date}},watch:{"postEditorStore.currentPost.limit_modified_date"(t){window.aioseoBus.$emit("standalone-update-post",{limit_modified_date:t})}}},L={key:0},v={class:"components-checkbox-control__input-container"},B={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img",class:"components-checkbox-control__checked","aria-hidden":"true",focusable:"false"},D=i("path",{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"},null,-1),M=[D],A={class:"components-checkbox-control__label",for:"aioseo-limit-modified-date-input"};function C(t,o,a,e,p,n){return e.postEditorStore.currentPost.id?(d(),m("div",L,[i("span",v,[_(i("input",{id:"aioseo-limit-modified-date-input",class:"components-checkbox-control__input",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=s=>e.postEditorStore.currentPost.limit_modified_date=s),onChange:o[1]||(o[1]=(...s)=>n.addLimitModifiedDateAttribute&&n.addLimitModifiedDateAttribute(...s))},null,544),[[f,e.postEditorStore.currentPost.limit_modified_date]]),n.canShowSvg?(d(),m("svg",B,M)):l("",!0)]),i("label",A,w(p.strings.label),1)])):l("",!0)}const V=u(y,[["render",C]]);if(r()&&window.wp){const{createElement:t}=window.wp.element,{registerPlugin:o}=window.wp.plugins,{PluginPostStatusInfo:a}=window.wp.editPost;o("aioseo-limit-modified-date",{render:()=>t(a,{},t("div",{id:"aioseo-limit-modified-date"}))})}const c=()=>{let t=h({...V,name:"Standalone/LimitModifiedDate"});t=g(t),t=x(t),t=P(t),b(t),t.mount("#aioseo-limit-modified-date")};k()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"&&(document.getElementById("aioseo-limit-modified-date")?c():(E("#aioseo-limit-modified-date","aioseoLimitModifiedDate"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoLimitModifiedDate"&&c()},{passive:!0})));
