import{L as C,ae as M,M as o,j as e,T as w,N as a,aW as S,af as b}from"./main-fine-mails-rush.js";import{$ as v}from"./useSocialTemplates-CALaJ7Id.js";import{u as j,a as x}from"./useMemoDebounce-Bwtl1ukJ.js";import{u as k}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{P as A}from"./PreviewDummy-B4JEjQhp.js";import{T as P}from"./TemplateDocLink-DZ7n7_Zf.js";import{M as $,p as l}from"./platformsLimitations-BpHu19Pc.js";import{p as D}from"./optionsHelper-C5kZneVU.js";import{s as F}from"./index-CFr-oYcN.js";import{R as L,C as m}from"./row-DS7Wtzse.js";import{C as i}from"./index-CYdJlGpp.js";import{F as p}from"./index-DvXnyFAQ.js";import{S as W}from"./Input-DqvQHhaj.js";import{S as N}from"./index-_4I6v-bI.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:R}=w;function ae(){const{token:r}=C.useToken(),[s,c]=M(v),{isTemplatesUpdateSuccessfully:h,updateSocialTemplates:g}=k(),[d,f]=F.useMessage();j(async()=>{const{status:t}=await g(s);h&&t&&x(d,t)},400,[s]);const n=(t,u)=>{c(T=>b(T,y=>{y.telegram[t]=u}))};return o(i,{style:{backgroundColor:r.colorFillAlter},children:[f,o(L,{gutter:20,children:[o(m,{span:14,children:[o(R,{level:4,children:[a("Telegram Template Settings")," "]}),e(P,{platform:"Telegram"}),o(i,{children:[e(i.Meta,{description:a("Custom message settings."),title:a("Custom Message")}),e("div",{children:e($,{onChange:t=>n("content",t),rows:5,style:{minWidth:200},value:s.telegram.content,wordCount:l.telegram.content.length})})]}),e(i,{style:{marginTop:10},children:o(p,{gap:20,justify:"space-between",children:[e(i.Meta,{description:a("Post styling and type setup."),title:a("Posting type")}),e("div",{children:e(W,{onChange:t=>n("postingType",t),options:D,style:{minWidth:200},value:s.telegram.postingType})})]})}),e(i,{style:{marginTop:10},children:o(p,{gap:20,justify:"space-between",children:[e(i.Meta,{description:S(a("Telegram restricts the length of a post to %1$d characters. If you enable this option, the first %1$d characters of your personalized message will be shared; if not, the limit prevents the post from being shared"),l.telegram.content.length),title:a("Trim Message")}),e("div",{children:e(N,{checked:s.telegram.trimMessage,onChange:t=>n("trimMessage",t)})})]})})]}),e(m,{span:10,children:e(A,{})})]})]})}export{ae as default};
