import{L as y,ae as M,M as o,j as t,T as C,N as a,af as S}from"./main-fine-mails-rush.js";import{$ as b}from"./useSocialTemplates-CALaJ7Id.js";import{u as v,a as j}from"./useMemoDebounce-Bwtl1ukJ.js";import{u as x}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{P as k}from"./PreviewDummy-B4JEjQhp.js";import{T as A}from"./TemplateDocLink-DZ7n7_Zf.js";import{M as P,p}from"./platformsLimitations-BpHu19Pc.js";import{p as $}from"./optionsHelper-C5kZneVU.js";import{s as D}from"./index-CFr-oYcN.js";import{C as i}from"./index-CYdJlGpp.js";import{F as l}from"./index-DvXnyFAQ.js";import{S as F}from"./Input-DqvQHhaj.js";import{S as L}from"./index-_4I6v-bI.js";import{C as m,R as z}from"./row-DS7Wtzse.js";import"./index-CzEr1K2Q.js";import"./index-C4jBXdje.js";import"./EyeOutlined-BwUAwdeL.js";import"./context-BHbH7wco.js";import"./EllipsisOutlined-Bu1rzp5h.js";import"./Dropdown-4_vtvAKA.js";import"./move-DlKUsITS.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(r,s){return this.cache.has(r)?this.cache.get(r):(this.cache.set(r,s),s)}};const{Title:N}=C;function it(){const{token:r}=y.useToken(),[s,c]=M(b),{isTemplatesUpdateSuccessfully:h,updateSocialTemplates:d}=x(),[g,f]=D.useMessage();v(async()=>{const{status:e}=await d(s);h&&e&&j(g,e)},400,[s]);const n=(e,u)=>{c(T=>S(T,w=>{w.twitter[e]=u}))};return o(z,{gutter:20,children:[f,t(m,{span:14,children:o(i,{size:"small",style:{backgroundColor:r.colorFillAlter},children:[o(N,{level:4,children:[" ",a("X (Twitter) Template Settings")," "]}),t(A,{platform:"X (Twitter)"}),o(i,{children:[t(i.Meta,{description:a("Custom message settings."),title:a("Custom Message")}),t("div",{children:t(P,{onChange:e=>n("content",e),rows:5,style:{minWidth:200},value:s.twitter.content})})]}),t(i,{style:{marginTop:10},children:o(l,{gap:20,justify:"space-between",children:[t(i.Meta,{description:a("Post styling and type setup."),title:a("Posting type")}),t("div",{children:t(F,{onChange:e=>n("postingType",e),options:$,style:{minWidth:200},value:s.twitter.postingType})})]})}),t(i,{style:{marginTop:10},children:o(l,{gap:20,justify:"space-between",children:[t(i.Meta,{description:`Twitter restricts the length of a tweet to ${p.twitter.description.length} characters. If you enable this option, the first ${p.twitter.description.length} characters of your personalized message will be shared; if not, the limit prevents the tweet from being shared.`,title:a("Trim Message")}),t("div",{children:t(L,{checked:s.twitter.trimMessage,onChange:e=>n("trimMessage",e)})})]})})]})}),t(m,{span:10,children:t(k,{})})]})}export{it as default};
