import{A as M,a4 as O,D as t,B as a,j as e,T as L,a5 as E}from"./main-crazy-owls-work.js";import{$ as S}from"./useSocialTemplates-Dcb3t5jQ.js";import{u as A,a as F}from"./useMemoDebounce-BIwvA9Mb.js";import{u as R}from"./useUpdateSocialTemplates-BBEsnaqI.js";import{T as j}from"./TiktokPreview-CrJnkWdj.js";import{T as _,p}from"./TemplateDocLink-C5Om0X4f.js";import{M as P}from"./AiPromptConfigModal-BrZd34tw.js";import{s as U}from"./index-C903bx6G.js";import{R as W,C as h}from"./row-DAt4Bs0l.js";import{C as i}from"./index-9x8aFyWV.js";import{F as n}from"./index-DLeF0Q26.js";import{S as m}from"./index-CV7ZrOqa.js";import{S as c}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(l,s){return this.cache.has(l)?this.cache.get(l):(this.cache.set(l,s),s)}};const{Title:d}=L;function ce(){const{token:l}=M.useToken(),[s,g]=O(S),{isTemplatesUpdateSuccessfully:u,updateSocialTemplates:y}=R(),[k,f]=U.useMessage();A(async()=>{const{status:o}=await y(s);u&&o&&F(k,o)},400,[s]);const r=(o,w)=>{g(C=>E(C,b=>{b.tiktok[o]=w}))},T=[{label:t("Only Message"),value:"onlyMessage"}],v=[{label:t("PUBLIC TO EVERYONE"),value:"PUBLIC_TO_EVERYONE"},{label:t("MUTUAL FOLLOW FRIENDS"),value:"MUTUAL_FOLLOW_FRIENDS"},{label:t("FOLLOWER OF CREATOR"),value:"FOLLOWER_OF_CREATOR"},{label:t("SELF ONLY"),value:"SELF_ONLY"}];return a(i,{style:{backgroundColor:l.colorFillAlter},children:[f,a(W,{gutter:20,children:[a(h,{span:14,children:[a(d,{level:4,children:[t("Tiktok Template Settings")," "]}),e(_,{platform:"Instagram"}),a(i,{children:[e(i.Meta,{description:t("Custom message settings."),title:t("Custom Message")}),e("div",{children:e(P,{onChange:o=>r("content",o),rows:5,style:{minWidth:200},value:s.tiktok.content,wordCount:p.tiktok.description.length})})]}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:t("Post styling and type setup."),title:t("Posting type")}),e("div",{children:e(m,{onChange:o=>r("postingType",o),options:T,style:{minWidth:200},value:s.tiktok.postingType})})]})}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:t("Who can see your post"),title:t("Privacy settings")}),e("div",{children:e(m,{onChange:o=>r("privacyLevel",o),options:v,style:{minWidth:200},value:s.tiktok.privacyLevel})})]})}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:t("Turn this on to let viewers share feedback or engage with your post through comments."),title:t("Allow comments")}),e("div",{children:e(c,{checked:s.tiktok.allowComment,onChange:o=>r("allowComment",o)})})]})}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:t("Enable this to let others create side-by-side reaction or collaboration videos with your post"),title:t("Allow Duet")}),e("div",{children:e(c,{checked:s.tiktok.duet,onChange:o=>r("duet",o)})})]})}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:t("Allow others to clip up to 5 seconds of your post for their own content"),title:t("Allow Stitch")}),e("div",{children:e(c,{checked:s.tiktok.stitch,onChange:o=>r("stitch",o)})})]})}),e(i,{style:{marginTop:10},children:a(n,{gap:20,justify:"space-between",children:[e(i.Meta,{description:`Instagram restricts the length of a post to ${p.tiktok.description.length} characters. If you enable this option, the first ${p.tiktok.description.length} characters of your personalized message will be shared; if not, the limit prevents the post from being shared.`,title:t("Trim Message")}),e("div",{children:e(c,{checked:s.tiktok.trimMessage,onChange:o=>r("trimMessage",o)})})]})})]}),a(h,{span:10,children:[a(d,{level:5,children:[" ",t("Preview")," "]}),e(j,{message:s.tiktok.content,type:s.tiktok.postingType})]})]})]})}export{ce as default};
