import{d as g,c as P}from"./js/runtime-dom.esm-bundler.dc49ee3e.js";import{l as S}from"./js/index.20093c86.js";import{l as x}from"./js/index.f5fa0cce.js";import{l as k}from"./js/index.d80c2c2c.js";import{u as E,n as e,K as b,a0 as y,a1 as B,l as L}from"./js/index.4b887428.js";import{e as v}from"./js/elemLoaded.2921fc72.js";import"./js/translations.e71e2202.js";import{_ as D}from"./js/_plugin-vue_export-helper.eefbdd86.js";import{_ as M}from"./js/default-i18n.65d58dd6.js";import{o as d,c as m,_ as n,aj as A,ae as l,a4 as c,$ as C}from"./js/runtime-core.esm-bundler.ce5add0b.js";import"./js/Button.9a301412.js";import"./js/Input.f04bee4d.js";import"./js/Index.2a391835.js";import"./js/Close.ccd53ef3.js";import"./js/Pencil.d82df6a1.js";import"./js/Trash.87a7d946.js";import"./js/Select.f950b4c6.js";import"./js/Caret.cd869c5d.js";import"./js/Toggle.11571651.js";import"./js/helpers.633a054c.js";const I="all-in-one-seo-pack",V={emits:["standalone-update-post"],setup(){return{postEditorStore:E()}},data(){return{strings:{label:M("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 e()&&this.postEditorStore.currentPost.limit_modified_date}},methods:{addLimitModifiedDateAttribute(){e()&&window.wp.data.dispatch("core/editor").editPost({aioseo_limit_modified_date:this.postEditorStore.currentPost.limit_modified_date})},isClassicEditor:b,isWooCommerceProduct:y,isBlockEditor:e}},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=n("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),j=[U],K={class:"components-checkbox-control__label",for:"aioseo-limit-modified-date-input"};function R(t,o,r,s,h,i){return s.postEditorStore.currentPost.id?(d(),m("div",N,[n("span",{class:l({"components-checkbox-control__input-container--block-editor":i.isBlockEditor()})},[A(n("input",{id:"aioseo-limit-modified-date-input",class:l({"components-checkbox-control__input":i.isBlockEditor()}),type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=a=>s.postEditorStore.currentPost.limit_modified_date=a),onChange:o[1]||(o[1]=(...a)=>i.addLimitModifiedDateAttribute&&i.addLimitModifiedDateAttribute(...a))},null,34),[[g,s.postEditorStore.currentPost.limit_modified_date]]),i.canShowSvg?(d(),m("svg",z,j)):c("",!0)],2),n("label",K,C(h.strings.label),1)])):c("",!0)}const W=D(V,[["render",R]]);var u,f,_,w;if(e()&&window.wp){const{createElement:t}=window.wp.element,{registerPlugin:o}=window.wp.plugins,r=((f=(u=window.wp)==null?void 0:u.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(r,{},t("div",{id:"aioseo-limit-modified-date"}))})}const p=()=>{let t=P({...W,name:"Standalone/LimitModifiedDate"});t=S(t),t=x(t),t=k(t),L(t),t.mount("#aioseo-limit-modified-date")};B()&&window.aioseo&&window.aioseo.currentPost&&window.aioseo.currentPost.context==="post"&&(document.getElementById("aioseo-limit-modified-date")?p():(v("#aioseo-limit-modified-date","aioseoLimitModifiedDate"),document.addEventListener("animationstart",function(o){o.animationName==="aioseoLimitModifiedDate"&&p()},{passive:!0})));
