import{o as r,c as l,a as i,Q as g,Z as P,K as c,b as m,t as S,Y as x}from"./js/runtime-dom.esm-bundler.5d5e6b71.js";import{l as b}from"./js/index.7c01c5f2.js";import{l as k}from"./js/index.eb92a2a8.js";import{l as E}from"./js/index.d80c2c2c.js";import{F as y,i as n,I as B,W as L,X as v,l as D}from"./js/index.bd66e758.js";import{e as M}from"./js/elemLoaded.2921fc72.js";import"./js/translations.d159963e.js";import{_ as A}from"./js/_plugin-vue_export-helper.eefbdd86.js";import{_ as C}from"./js/default-i18n.20001971.js";import"./js/Caret.382b7591.js";import"./js/helpers.bf0d86e6.js";const I="all-in-one-seo-pack",V={emits:["standalone-update-post"],setup(){return{postEditorStore:y()}},data(){return{strings:{label:C("Don't update the modified date",I)}}},watch:{"postEditorStore.currentPost.limit_modified_date"(t){window.aioseoBus.$emit("standalone-update-post",{limit_modified_date:t})}},computed:{canShowSvg(){return n()&&this.postEditorStore.currentPost.limit_modified_date}},methods:{addLimitModifiedDateAttribute(){n()&&window.wp.data.dispatch("core/editor").editPost({aioseo_limit_modified_date:this.postEditorStore.currentPost.limit_modified_date})},isClassicEditor:B,isWooCommerceProduct:L,isBlockEditor:n}},N={key:0},z={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"},U=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),W=[U],F={class:"components-checkbox-control__label",for:"aioseo-limit-modified-date-input"};function K(t,o,d,s,h,e){return s.postEditorStore.currentPost.id?(r(),l("div",N,[i("span",{class:c({"components-checkbox-control__input-container--block-editor":e.isBlockEditor()})},[g(i("input",{id:"aioseo-limit-modified-date-input",class:c({"components-checkbox-control__input":e.isBlockEditor()}),type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=a=>s.postEditorStore.currentPost.limit_modified_date=a),onChange:o[1]||(o[1]=(...a)=>e.addLimitModifiedDateAttribute&&e.addLimitModifiedDateAttribute(...a))},null,34),[[P,s.postEditorStore.currentPost.limit_modified_date]]),e.canShowSvg?(r(),l("svg",z,W)):m("",!0)],2),i("label",F,S(h.strings.label),1)])):m("",!0)}const Q=A(V,[["render",K]]);var p,f,_,w;if(n()&&window.wp){const{createElement:t}=window.wp.element,{registerPlugin:o}=window.wp.plugins,d=((f=(p=window.wp)==null?void 0:p.editor)==null?void 0:f.PluginPostStatusInfo)||((w=(_=window.wp)==null?void 0:_.editPost)==null?void 0:w.PluginPostStatusInfo);o("aioseo-limit-modified-date",{render:()=>t(d,{},t("div",{id:"aioseo-limit-modified-date"}))})}const u=()=>{let t=x({...Q,name:"Standalone/LimitModifiedDate"});t=b(t),t=k(t),t=E(t),D(t),t.mount("#aioseo-limit-modified-date")};v()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"&&(document.getElementById("aioseo-limit-modified-date")?u():(M("#aioseo-limit-modified-date","aioseoLimitModifiedDate"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoLimitModifiedDate"&&u()},{passive:!0})));
