import{L as M,ae as w,M as i,j as e,T as v,N as s,aW as S,af as b}from"./main-fine-mails-rush.js";import{$ as j}from"./useSocialTemplates-CALaJ7Id.js";import{u as x,a as A}from"./useMemoDebounce-Bwtl1ukJ.js";import{u as k}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{P}from"./PreviewDummy-B4JEjQhp.js";import{T as W}from"./TemplateDocLink-DZ7n7_Zf.js";import{M as p,p as l}from"./platformsLimitations-BpHu19Pc.js";import{p as F}from"./optionsHelper-C5kZneVU.js";import{s as $}from"./index-CFr-oYcN.js";import{R as D,C as c}from"./row-DS7Wtzse.js";import{C as o}from"./index-CYdJlGpp.js";import{F as m}from"./index-DvXnyFAQ.js";import{S as L}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,a){return this.cache.has(r)?this.cache.get(r):(this.cache.set(r,a),a)}};const{Title:R}=v;function ae(){const{token:r}=M.useToken(),[a,h]=w(j),{isTemplatesUpdateSuccessfully:d,updateSocialTemplates:g}=k(),[u,f]=$.useMessage();x(async()=>{const{status:t}=await g(a);d&&t&&A(u,t)},400,[a]);const n=(t,y)=>{h(T=>b(T,C=>{C.threads[t]=y}))};return i(o,{style:{backgroundColor:r.colorFillAlter},children:[f,i(D,{gutter:20,children:[i(c,{span:14,children:[i(R,{level:4,children:[s("threads Template Settings")," "]}),e(W,{platform:"threads"}),i(o,{children:[e(o.Meta,{description:s("Custom message settings."),title:s("Custom Message")}),e("div",{children:e(p,{onChange:t=>n("content",t),rows:5,style:{minWidth:200},value:a.threads.content,wordCount:l.threads.content.length})})]}),e(o,{style:{marginTop:10},children:i(m,{gap:20,justify:"space-between",children:[e(o.Meta,{description:s("Post styling and type setup."),title:s("Posting type")}),e("div",{children:e(L,{onChange:t=>n("postingType",t),options:F,style:{minWidth:200},value:a.threads.postingType})})]})}),i(o,{style:{marginTop:10},children:[e(o.Meta,{description:s("Add a topic"),title:s("Topic")}),e("div",{children:e(p,{onChange:t=>n("topic",t),rows:1,style:{minWidth:200},value:a.threads.topic,wordCount:l.threads.topic.length})})]}),i(o,{style:{marginTop:10},children:[e(o.Meta,{description:s("Your reply"),title:s("First reply")}),e("div",{children:e(p,{onChange:t=>n("comment",t),rows:2,style:{minWidth:200},value:a.threads.comment,wordCount:l.threads.comment.length})})]}),e(o,{style:{marginTop:10},children:i(m,{gap:20,justify:"space-between",children:[e(o.Meta,{description:S(s("Threads 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.threads.content.length),title:s("Trim Message")}),e("div",{children:e(N,{checked:a.threads.trimMessage,onChange:t=>n("trimMessage",t)})})]})})]}),e(c,{span:10,children:e(P,{})})]})]})}export{ae as default};
