import{x as g,y as d,z as m,A as y,r as f,I as b,M as C,B as a,j as o,T as s,D as r,N as w,F as h,J as T,S as x,ak as S}from"./main-crazy-owls-work.js";import{C as j}from"./CronWarning-HxNn1fBs.js";import{C as i}from"./index-9x8aFyWV.js";import{S as v}from"./index-Uj_IJMNj.js";import"./useSettings-B38Kxbj2.js";import"./EllipsisOutlined-7nGPDvd9.js";import"./Dropdown-D0863Mnh.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function A(){const e=g(),{isPending:t,mutateAsync:l}=d({mutationFn:async n=>m("pro_settings/external-cron/update",{settings:n},void 0,"POST"),onSuccess:n=>{if("errors"in n.data)return n;e.invalidateQueries({queryKey:["all-settings"]})}});return{isUpdatingProSettings:t,updateProSettings:l}}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const{Paragraph:k,Text:c,Title:u}=s;var M={name:"1p2emnz",styles:"color:#4059ff !important;font-size:16px !important"};function P(){const{token:e}=y.useToken(),t=`wget -O /dev/null ${window.location.origin}/wp-cron.php?doing_wp_cron > /dev/null 2>&1`,{isUpdatingProSettings:l}=A(),[n]=f.useState({}),p=b(C);return a(i,{style:{backgroundColor:e.colorFillAlter},children:[o(u,{level:4,children:r("Cron Setup")}),a(k,{children:[r("All settings here"),a(s.Link,{href:"https://bit-social.com/documentation/setting/setup-cron-jobs/",rel:"noopener noreferrer nofollow",target:"_blank",underline:!0,children:[r("Doc here"),o(w,{size:12,style:{transform:"translateY(-2px)"}})]})]}),a(i,{style:{marginBottom:16},children:[o(i.Meta,{description:a(h,{children:[r("For more accurate results, you must establish a genuine"),o(s.Link,{href:"https://bit-social.com/documentation/setting/setup-cron-jobs/",rel:"noopener noreferrer nofollow",target:"_blank",underline:!0,children:r("Cron job")}),r("on your hosting or server and enable this option to disregard the built-in Cron job.Otherwise, the auto-post and scheduling tools might not operate promptly, and you might have delays.")]}),style:{marginBottom:8},title:r("Cron Job settings")}),o(j,{type:"settings"}),a(u,{level:5,children:[" ",r("For your website, the Cron Job command is:")," "]}),o(c,{copyable:{text:t},css:M,children:t})]}),a(i,{style:{marginBottom:16},children:[o(i.Meta,{description:r("Activate Bit Social's external cron feature for continuous cron job operation even if there is no user's hit on your website. This cron will automatically awake your website externally and your scheduled post will automatically publish on your desired social platforms!"),style:{marginBottom:8},title:a(h,{children:[r("External Cron")," ",o(T,{color:"#ff8609",size:22})]})}),a(x,{children:[o(c,{strong:!0,children:r("Enable External Cron")}),o(v,{onChange:()=>p(!0),size:"small",value:!1}),l&&o(S,{size:"small"})]}),o("div",{children:n&&o(c,{type:"danger",children:n==null?void 0:n.isExternalCronEnabled})})]})]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const{Paragraph:$,Text:U,Title:q}=s;globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};function J(){return o(P,{})}export{J as default};
