import{L as v,ae as M,N as s,M as a,j as e,T as B,af as S}from"./main-fine-mails-rush.js";import{$ as C}from"./useSocialTemplates-CALaJ7Id.js";import{u as O,a as w}from"./useMemoDebounce-Bwtl1ukJ.js";import{u as R}from"./useUpdateSocialTemplates-CGdlKwjv.js";import{P as j}from"./PreviewDummy-B4JEjQhp.js";import{T as A}from"./TemplateDocLink-DZ7n7_Zf.js";import{M as N,p}from"./platformsLimitations-BpHu19Pc.js";import{s as k}from"./index-CFr-oYcN.js";import{C as i}from"./index-CYdJlGpp.js";import{F as r}from"./index-DvXnyFAQ.js";import{S as c}from"./Input-DqvQHhaj.js";import{S as x}from"./index-_4I6v-bI.js";import{C as m,R as E}from"./row-DS7Wtzse.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,o){return this.cache.has(l)?this.cache.get(l):(this.cache.set(l,o),o)}};const{Title:G}=B,I=[{label:"No Button",value:"none"},{label:"SIGN UP",value:"SIGN_UP"},{label:"LEARN MORE",value:"LEARN_MORE"},{label:"SHOP",value:"SHOP"},{label:"ORDER",value:"ORDER"},{label:"BOOK",value:"BOOK"}];function oe(){const{token:l}=v.useToken(),[o,u]=M(C),{isTemplatesUpdateSuccessfully:g,updateSocialTemplates:h}=R(),[d,f]=k.useMessage();O(async()=>{const{status:t}=await h(o);g&&t&&w(d,t)},400,[o]);const n=(t,b)=>{u(P=>S(P,T=>{T.googleBusinessProfile[t]=b}))},y=[{label:s("Only custom message"),value:"onlyMessage"},{label:s("Feature image"),value:"isFeaturedImage"},{label:s("Product Image"),value:"isProductImage"}];return a(E,{gutter:20,children:[f,e(m,{span:14,children:a(i,{size:"small",style:{backgroundColor:l.colorFillAlter},children:[a(G,{level:4,children:[" ",s("Google Business Profile Template Settings")," "]}),e(A,{platform:"Google Business Profile"}),a(i,{children:[e(i.Meta,{description:s("Custom message settings."),title:s("Custom Message")}),e("div",{children:e(N,{onChange:t=>n("content",t),rows:5,style:{minWidth:200},value:o.googleBusinessProfile.content})})]}),e(i,{style:{marginTop:10},children:a(r,{gap:20,justify:"space-between",children:[e(i.Meta,{description:s("Post styling and type setup."),title:s("Posting type")}),e("div",{children:e(c,{onChange:t=>n("postingType",t),options:y,style:{minWidth:200},value:o.googleBusinessProfile.postingType})})]})}),e(i,{style:{marginTop:10},children:a(r,{gap:20,justify:"space-between",children:[e(i.Meta,{description:s("Select a post link button."),title:s("Add a button")}),e("div",{children:e(c,{onChange:t=>n("button",t),options:I,style:{minWidth:200},value:o.googleBusinessProfile.button})})]})}),e(i,{style:{marginTop:10},children:a(r,{gap:20,justify:"space-between",children:[e(i.Meta,{description:`Google Business Profile restricts the length of a post to ${p.googleBusinessProfile.description.length} characters. If you enable this option, the first ${p.googleBusinessProfile.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(x,{checked:o.googleBusinessProfile.trimMessage,onChange:t=>n("trimMessage",t)})})]})})]})}),e(m,{span:10,children:e(j,{})})]})}export{I as buttonOptions,oe as default};
