import{L as b,ae as M,N as t,M as a,j as e,T as L,af as O}from"./main-fine-mails-rush.js";import{$ as E}from"./useSocialTemplates-CALaJ7Id.js";import{u as S,a as A}from"./useMemoDebounce-Bwtl1ukJ.js";import{u as F}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{P as R}from"./PreviewDummy-B4JEjQhp.js";import{T as j}from"./TemplateDocLink-DZ7n7_Zf.js";import{M as _,p}from"./platformsLimitations-BpHu19Pc.js";import{s as N}from"./index-CFr-oYcN.js";import{R as P,C as h}from"./row-DS7Wtzse.js";import{C as i}from"./index-CYdJlGpp.js";import{F as r}from"./index-DvXnyFAQ.js";import{S as m}from"./Input-DqvQHhaj.js";import{S as c}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(l,s){return this.cache.has(l)?this.cache.get(l):(this.cache.set(l,s),s)}};const{Title:U}=L;function ie(){const{token:l}=b.useToken(),[s,d]=M(E),{isTemplatesUpdateSuccessfully:g,updateSocialTemplates:u}=F(),[y,f]=N.useMessage();S(async()=>{const{status:o}=await u(s);g&&o&&A(y,o)},400,[s]);const n=(o,v)=>{d(w=>O(w,C=>{C.tiktok[o]=v}))},k=[{label:t("Only Message"),value:"onlyMessage"}],T=[{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(P,{gutter:20,children:[a(h,{span:14,children:[a(U,{level:4,children:[t("Tiktok Template Settings")," "]}),e(j,{platform:"Instagram"}),a(i,{children:[e(i.Meta,{description:t("Custom message settings."),title:t("Custom Message")}),e("div",{children:e(_,{onChange:o=>n("content",o),rows:5,style:{minWidth:200},value:s.tiktok.content,wordCount:p.tiktok.description.length})})]}),e(i,{style:{marginTop:10},children:a(r,{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=>n("postingType",o),options:k,style:{minWidth:200},value:s.tiktok.postingType})})]})}),e(i,{style:{marginTop:10},children:a(r,{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=>n("privacyLevel",o),options:T,style:{minWidth:200},value:s.tiktok.privacyLevel})})]})}),e(i,{style:{marginTop:10},children:a(r,{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=>n("allowComment",o)})})]})}),e(i,{style:{marginTop:10},children:a(r,{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=>n("duet",o)})})]})}),e(i,{style:{marginTop:10},children:a(r,{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=>n("stitch",o)})})]})}),e(i,{style:{marginTop:10},children:a(r,{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=>n("trimMessage",o)})})]})})]}),e(h,{span:10,children:e(R,{})})]})]})}export{ie as default};
