import{L as v,U as P,X as w,V as L,Y as A,ae as j,N as s,M as i,j as e,W as m,S as p,T as F,F as I,af as x}from"./main-fine-mails-rush.js";import{$}from"./useSocialTemplates-CALaJ7Id.js";import{u as O,a as z}from"./useMemoDebounce-Bwtl1ukJ.js";import{M as D,p as d}from"./platformsLimitations-BpHu19Pc.js";import{u as U}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{i as W}from"./optionsHelper-C5kZneVU.js";import{T as B}from"./TemplateDocLink-DZ7n7_Zf.js";import{P as N}from"./PreviewDummy-B4JEjQhp.js";import{s as R}from"./index-CFr-oYcN.js";import{R as V,C as h}from"./row-DS7Wtzse.js";import{C as a}from"./index-CYdJlGpp.js";import{F as g}from"./index-DvXnyFAQ.js";import{S as _}from"./Input-DqvQHhaj.js";import{S as H}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(o,n){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,n),n)}};const{Title:X}=F;function he(){const{token:o}=v.useToken(),{isProClient:n}=P(w),u=L(A),[r,f]=j($),{isTemplatesUpdateSuccessfully:y,updateSocialTemplates:T}=U(),[C,M]=R.useMessage();O(async()=>{const{status:t}=await T(r);y&&t&&z(C,t)},400,[r]);const l=(t,c)=>{if(typeof c=="string"&&W(t,c)){u(!0);return}f(b=>x(b,S=>{S.linkedin[t]=c}))},k=[{label:s("Only custom message"),value:"onlyMessage"},{label:s("Link card"),value:"isLinkCard"},{label:s("Feature image"),value:"isFeaturedImage"},{label:i(p,{align:"center",children:[s("Product Image"),!n&&e(m,{color:"#ff8609",size:20})]}),value:"isProductImage"},{label:i(p,{align:"center",children:[s("All Images"),!n&&e(m,{color:"#ff8609",size:20})]}),value:"isAllImages"}];return i(I,{children:[M,i(V,{gutter:20,children:[e(h,{span:14,children:i(a,{size:"small",style:{backgroundColor:o.colorFillAlter},children:[i(X,{level:4,children:[" ",s("Linkedin Template Settings")," "]}),e(B,{platform:"Linkedin"}),i(a,{children:[e(a.Meta,{description:s("Custom message settings."),title:s("Custom Message")}),e("div",{children:e(D,{onChange:t=>l("content",t),rows:5,style:{minWidth:200},value:r.linkedin.content})})]}),e(a,{style:{marginTop:10},children:i(g,{gap:20,justify:"space-between",children:[e(a.Meta,{description:s("Post styling and type setup."),title:s("Posting type")}),e("div",{children:e(_,{onChange:t=>l("postingType",t),options:k,style:{minWidth:200},value:r.linkedin.postingType})})]})}),e(a,{style:{marginTop:10},children:i(g,{gap:20,justify:"space-between",children:[e(a.Meta,{description:`LinkedIn restricts the length of a post to ${d.linkedin.description.length} characters. If you enable this option, the first ${d.linkedin.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(H,{checked:r.linkedin.trimMessage,onChange:t=>l("trimMessage",t)})})]})})]})}),e(h,{span:10,children:e(N,{})})]})]})}export{he as default};
