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