(()=>{"use strict";const e=window.React,t=window.wp.plugins,o=window.wp.i18n,d=window.wp.data,n=window.wp.editPost,i=window.wp.date,a=window.wp.components,r=()=>{const t=(0,i.getSettings)(),r=t.formats.date+" "+t.formats.time,{editedModified:s,currentModified:l,postStatus:u,postMeta:c}=(0,d.useSelect)((e=>({editedModified:e("core/editor").getEditedPostAttribute("modified"),currentModified:e("core/editor").getCurrentPostAttribute("modified"),postStatus:e("core/editor").getEditedPostAttribute("status"),postMeta:e("core/editor").getEditedPostAttribute("meta")}))),{editPost:m}=(0,d.useDispatch)("core/editor");return["auto-draft","future"].includes(u)?null:(0,e.createElement)(n.PluginPostStatusInfo,null,"yes"==c?._lmt_disableupdate?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,o.__)("Last Modified","soledad")),(0,e.createElement)("b",null,(0,i.dateI18n)(r,s))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,o.__)("Modified","soledad")),(0,e.createElement)(a.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-schedule__dialog",renderToggle:({onToggle:t,isOpen:o})=>(0,e.createElement)(a.Button,{className:"edit-post-post-schedule__toggle",variant:"tertiary",onClick:t,"aria-expanded":o},(0,i.dateI18n)(r,s)),renderContent:()=>{return(0,e.createElement)(a.DateTimePicker,{currentDate:s,onChange:e=>{m({modified:e})},is12Hour:(o=t.formats.time,/(?:^|[^\\])[aAgh]/.test(o)),__nextRemoveResetButton:!0});var o}})))},s=()=>{const{postStatus:t,postMeta:i}=(0,d.useSelect)((e=>({postStatus:e("core/editor").getEditedPostAttribute("status"),postMeta:e("core/editor").getEditedPostAttribute("meta")}))),{editPost:r}=(0,d.useDispatch)("core/editor");return["auto-draft","future"].includes(t)?null:(0,e.createElement)(n.PluginPostStatusInfo,null,(0,e.createElement)(a.CheckboxControl,{label:(0,o.__)("Freeze modified date","soledad"),checked:"yes"==i?._lmt_disableupdate,onChange:()=>r({meta:{_lmt_disableupdate:"yes"==i?._lmt_disableupdate?"no":"yes"}})}))};(0,t.registerPlugin)("soledad-modified-info",{render:()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r,null),(0,e.createElement)(s,null)),icon:null})})();