import{o as r,d as l,e as i,Q as g,Z as P,K as m,b as c,t as S,Y as x}from"./js/runtime-dom.esm-bundler.d8b05b6d.js";import{l as b}from"./js/index.1e409735.js";import{l as k}from"./js/index.62c20ef8.js";import{l as E}from"./js/index.d80c2c2c.js";import{e as B,i as n,B as y,H as L,l as v}from"./js/index.684c656d.js";import{e as D}from"./js/elemLoaded.2921fc72.js";import{s as M}from"./js/metabox.9787fdb7.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.2e43336b.js";import"./js/helpers.2304d5ee.js";const I="all-in-one-seo-pack",V={emits:["standalone-update-post"],setup(){return{postEditorStore:B()}},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:y,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),H=[U],K={class:"components-checkbox-control__label",for:"aioseo-limit-modified-date-input"};function Q(t,o,d,s,h,e){return s.postEditorStore.currentPost.id?(r(),l("div",N,[i("span",{class:m({"components-checkbox-control__input-container--block-editor":e.isBlockEditor()})},[g(i("input",{id:"aioseo-limit-modified-date-input",class:m({"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,H)):c("",!0)],2),i("label",K,S(h.strings.label),1)])):c("",!0)}const R=A(V,[["render",Q]]);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({...R,name:"Standalone/LimitModifiedDate"});t=b(t),t=k(t),t=E(t),v(t),t.mount("#aioseo-limit-modified-date")};M()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"&&(document.getElementById("aioseo-limit-modified-date")?u():(D("#aioseo-limit-modified-date","aioseoLimitModifiedDate"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoLimitModifiedDate"&&u()},{passive:!0})));
