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