import{d as g,c as P}from"./js/runtime-dom.esm-bundler.f6259c83.js";import{l as S}from"./js/index.7c01c5f2.js";import{l as x}from"./js/index.e8c482d5.js";import{l as k}from"./js/index.d80c2c2c.js";import{u as E,n as e,J as b,X as y,Y as B,m as L}from"./js/index.ed1fc0db.js";import{e as v}from"./js/elemLoaded.2921fc72.js";import"./js/translations.d159963e.js";import{_ as D}from"./js/_plugin-vue_export-helper.eefbdd86.js";import{_ as M}from"./js/default-i18n.20001971.js";import{o as d,c as m,a as n,aj as A,ae as l,a4 as c,$ as C}from"./js/runtime-core.esm-bundler.4f558f23.js";import"./js/Button.e237bb50.js";import"./js/Input.d9e61fc6.js";import"./js/Index.504e4ac6.js";import"./js/Close.8fb798f7.js";import"./js/Pencil.b89246dd.js";import"./js/Trash.263ee9c7.js";import"./js/Select.4ddf605b.js";import"./js/Caret.b694929e.js";import"./js/Toggle.61ecb096.js";import"./js/helpers.2a6f0df7.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],J={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",J,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})));
