import{A as C,a4 as M,B as o,j as e,T as w,D as i,a5 as v}from"./main-crazy-owls-work.js";import{$ as S}from"./useSocialTemplates-Dcb3t5jQ.js";import{u as I,a as P}from"./useMemoDebounce-BIwvA9Mb.js";import{u as j}from"./useUpdateSocialTemplates-BBEsnaqI.js";import{B}from"./BlueskyPreview-DFavlUrU.js";import{T as A,p as m}from"./TemplateDocLink-C5Om0X4f.js";import{I as x}from"./index-Bm9W7Nqt.js";import{M as g}from"./AiPromptConfigModal-BrZd34tw.js";import{p as F}from"./optionsHelper-B_8X5Dll.js";import{s as $}from"./index-C903bx6G.js";import{R as D,C as u}from"./row-DAt4Bs0l.js";import{C as a}from"./index-9x8aFyWV.js";import{F as l}from"./index-DLeF0Q26.js";import{S as N}from"./index-CV7ZrOqa.js";import{S as W}from"./index-Uj_IJMNj.js";import"./PreviewCard-DAT49Z9x.js";import"./emotion-react.browser.esm-Y_LRzwGN.js";import"./index-B1hhaeCD.js";import"./index-DbMzUBXN.js";import"./AntIconWrapper-CV4oO3YH.js";import"./index-D66C40IV.js";import"./Input-DrlF5Epd.js";import"./EyeOutlined-BpDfhdMV.js";import"./context-DxDN2Q9A.js";import"./mediaQueryUtil-BSyvLspT.js";import"./EllipsisOutlined-7nGPDvd9.js";import"./Dropdown-D0863Mnh.js";import"./move-ULSkkuK6.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:d}=w;function ce(){const{token:r}=C.useToken(),[s,y]=M(S),{isTemplatesUpdateSuccessfully:f,updateSocialTemplates:T}=j(),[b,k]=$.useMessage();I(async()=>{const{status:t}=await T(s);f&&t&&P(b,t)},400,[s]);const n=(t,p)=>{y(c=>v(c,h=>{t==="postingType"&&c.bluesky.postingType==="isPromptImage"&&p!=="isPromptImage"&&(h.bluesky.promptImage=""),h.bluesky[t]=p}))};return o(a,{style:{backgroundColor:r.colorFillAlter},children:[k,o(D,{gutter:20,children:[o(u,{span:14,children:[o(d,{level:4,children:[i("Bluesky Template Settings")," "]}),e(A,{platform:"Bluesky"}),o(a,{children:[e(a.Meta,{description:i("Custom message settings."),title:i("Custom Message")}),e("div",{children:e(g,{onChange:t=>n("content",t),rows:5,style:{minWidth:200},value:s.bluesky.content,wordCount:m.bluesky.content.length})})]}),e(a,{style:{marginTop:10},children:o(l,{gap:20,justify:"space-between",children:[e(a.Meta,{description:i("Post styling and type setup."),title:i("Posting type")}),e("div",{children:e(N,{onChange:t=>n("postingType",t),options:F,style:{minWidth:200},value:s.bluesky.postingType})})]})}),s.bluesky.postingType==="isPromptImage"&&e(a,{style:{marginTop:10},children:o(l,{gap:20,justify:"space-between",children:[e(a.Meta,{description:i("Select an AI prompt for image generation."),title:i("Prompt Name")}),e("div",{children:e(x,{onChange:t=>n("promptImage",t),value:s.bluesky.promptImage})})]})}),o(a,{style:{marginTop:10},children:[e(a.Meta,{description:i("Your comment"),title:i("First comment")}),e("div",{children:e(g,{onChange:t=>n("comment",t),rows:1,style:{minWidth:200},value:s.bluesky.comment,wordCount:m.bluesky.comment.length})})]}),e(a,{style:{marginTop:10},children:o(l,{gap:20,justify:"space-between",children:[e(a.Meta,{description:`Bluesky restricts the length of a post to ${m.bluesky.content.length} characters. If you enable this option, the first ${m.bluesky.content.length} characters of your personalized message will be shared; if not, the limit prevents the post from being shared.`,title:i("Trim Message")}),e("div",{children:e(W,{checked:s.bluesky.trimMessage,onChange:t=>n("trimMessage",t)})})]})})]}),o(u,{span:10,children:[o(d,{level:5,children:[" ",i("Preview")," "]}),e(B,{message:s.bluesky.content,type:s.bluesky.postingType})]})]})]})}export{ce as default};
