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