PageSourceSearch

https://app.gallabox.com/assets/index-Cvr5iBSI.js

js gallabox.com collected 2026-09-24 12:02:44 UTC 27,898 bytes, 1 lines download raw bytes

1import{j as e}from"./iconBase-hw0CKlfC.js";import{A as pe}from"./AccountsMenu-C7BmnDwO.js";import{importShared as N}from"./__federation_fn_import-wplON-6D.js";import{ar as me,ba as de,aT as be}from"./__federation_expose_ComponentsChannelMenuSelectV2-DrvW0c5d.js";import{Q as Z}from"./cloneDeep-CVeI5E8J.js";import{q as ge,v as fe,p as Ne,f as q,T as he,I as G,c as I,a as k,i as H,Q as P,N as xe,O as ve}from"./__federation_expose_UtilsCommonUtils-B1mvlWkB.js";import{u as Y,a as Ie}from"./history-BBlzUKQG.js";import{h as He}from"./__federation_expose_Wa-templatesUtilsTemplateSendUtils-CcUFRDc_.js";import{I as we}from"./icon1-CD3ZscQo.js";import{u as $,T as o}from"./index-C2xEgYuP.js";import{b as De}from"./index-mVZiyODU.js";import{t as Ce}from"./yup.module-BamwMAe2.js";import{u as Ee,InputV2 as ke,Switch as F}from"./__federation_expose_UtilsFormUtils-Dpn6j6GY.js";import{I as Ve,a as V}from"./IntegrationFormFieldGroupWrapper-CVqc-juY.js";import{L as Q}from"./InfoLabel-DD15dZiL.js";import{C as ye}from"./ControlledChannelPicker-Br63gE0_.js";import je from"./__federation_expose_ComponentsFormControlWrapper-B6_1vWC0.js";import{s as Se}from"./util-DSjl4hQe.js";import{U as Te}from"./users-round-D0GTujGL.js";import{L as Oe}from"./LogTable-CKWnHHkv.js";import{I as Ae}from"./IntegrationConnectStrip-txhPl6J7.js";import{I as y,O as Re}from"./IntegrationTabWrapper-Cm1owf8d.js";import{I as We}from"./IntegrationDetailBreadCrumbs-CeSqf5Iv.js";const{useToast:M}=await N("@chakra-ui/react"),{useMutation:_,useQueryClient:ee}=await N("react-query"),ne=t=>{const{accountId:n,onSuccess:r,onError:p}=t,i=M();return _(c=>ge(`/api/accounts/${n}/integrations/hubspot/connect`,c),{onError:c=>{p?.(),i({title:"Error",status:"error",description:c.message})},onSuccess:r})},Le=t=>{const{accountId:n,integrationId:r,...p}=t,i=M(),a=ee(),u=[Z.Integration,{accountId:n,integrationId:r}];return _(l=>Ne(`/api/accounts/${n}/integrations/hubspot/${r}`,l),{onError:l=>{i({title:"Error",status:"error",description:l.message})},onSettled:()=>{a.invalidateQueries(u)},onSuccess:()=>{i({title:"Integration Updated",status:"success"})},...p})},Pe=t=>{const{accountId:n,integrationId:r,onSuccess:p}=t,i=ee(),a=M({isClosable:!0,duration:2e3}),u=[Z.IntegrationFieldsList,{accountId:n}];return _(()=>fe(`/api/accounts/${n}/integrations/hubspot/${r}`),{onError:(l,g,w)=>{i.setQueryData(u,w),a({title:"Error",status:"error",description:l.message??"Error while deleting Integration"})},onSuccess:()=>{a({title:"Integration  Deleted",status:"success",description:"Integration deleted successfully!"}),p?.()},onMutate:async()=>(await i.cancelQueries(u),i.getQueryData(u)??[[]]),onSettled:()=>{i.invalidateQueries(u)}})},{Divider:Fe,FormLabel:z,Icon:j,useToast:ze,VStack:h}=await N("@chakra-ui/react"),{Box:E,Button:Be,HStack:x,Text:v}=await N("@chakra-ui/react"),te=await N("react"),{useEffect:qe,useRef:$e}=te,Me={labelProps:{fontSize:"sm",fontWeight:"normal",margin:0,color:"inherit",width:"fit-content"},fieldContainerProps:{marginLeft:3,maxW:"270px"},labelContainerProps:{maxW:"296px",alignSelf:"flex-start"}},_e=()=>I().shape({name:k().required(H._({id:"Muc7n2",message:"integrationName is required"})).min(3,H._({id:"SpZ48B",message:"integrationName must be atleast 3 characters"})).max(100,H._({id:"2gPJGw",message:"integrationName must be atleast 100 characters"})),crmConfig:I().shape({contact:I().shape({syncOut:P().optional()}),conversation:I().shape({syncConversation:P().optional()}),message:I().shape({sendHubspotNotification:P().optional()})}),channelSelect:xe().of(I().shape({icon:ve().optional(),label:k().optional(),value:k().trim().required(H._({id:"hXUWyd",message:"Value is required"})),labelDescription:k().optional()})).test("channel-required-when-notification-enabled",H._({id:"M18lZr",message:"At least one channel is required when signal is enabled"}),function(t){const{crmConfig:n}=this.parent;return n?.message?.sendHubspotNotification&&(!t||t.length===0)?this.createError({message:H._({id:"M18lZr",message:"At least one channel is required when signal is enabled"}),path:this.path}):!0})}),Ue=({data:t})=>{const{_:n}=$(),r=q(),p=t?.id??"",i=he()??[],a=t?.hubspot&&t?.hubspot?.version!=="v2",u=$e(!!t?.hubspot?.notificationPropertyCreated),c=t?.hubspot&&t.hubspot?.notificationPropertyCreated,{mutateAsync:m,isLoading:l}=ne({accountId:r}),g=te.useCallback(f=>{const{name:O,crmConfig:b}=f?.hubspot??{},A=b?.message?.channelIds,R=me(i),W=(A??[]).map(C=>R.find(L=>L.value===C)).filter(C=>C!==void 0);return{name:O,crmConfig:{contact:{syncOut:b?.contact?.syncOut,syncAs:b?.contact?.syncAs},conversation:{syncConversation:b?.conversation?.syncConversation},message:{sendHubspotNotification:!!b?.message?.sendHubspotNotification}},channelSelect:W}},[]),w=g(t),{register:S,handleSubmit:T,errors:s,control:d,reset:D,formState:{isDirty:U}}=Ee({defaultValues:g(t),resolver:Ce(_e())}),se=ze(),{mutate:ae,isLoading:ie}=Le({accountId:r,integrationId:p,onSuccess:f=>{se({title:n({id:"pf9v+o",message:"Integration Updated"}),status:"success"}),D(g(f))}}),oe=f=>{const{name:O,crmConfig:b,channelSelect:A}=f,R=A?.map(L=>L?.value)??[],W=b?.contact?.syncOut??!1,C=b?.conversation?.syncConversation??!1;ae({name:O,crmConfig:{contact:{syncAs:"contact",syncOut:W},conversation:{syncConversation:C},message:{sendHubspotNotification:!!b?.message?.sendHubspotNotification,webhookUrl:b?.message?.webhookUrl??"",channelIds:R}}})},re=()=>{D()},ce=()=>e.jsxDEV(Q,{module:"integrations",buttonType:"hyperlink",colorScheme:"brand",fontWeight:"medium",fontSize:"14px",link:"https://docs.gallabox.com/integration/customer-relationship-management-crm-systems/hubspot",rightIcon:e.jsxDEV(j,{as:G},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:207,columnNumber:20},void 0),children:e.jsxDEV(o,{id:"WQ/dOo",message:"How to configure?"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:209,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:200,columnNumber:7},void 0),ue=async()=>
1{if(t?.hubspot?.name){const f=await m({name:t.hubspot.name});f.uri&&window.open(f.uri,"_self")}},le=()=>a?e.jsxDEV(Be,{isLoading:l,colorScheme:"brand",size:"sm",borderEndRadius:"6px",fontWeight:"medium",onClick:ue,children:e.jsxDEV(o,{id:"klegXS",message:"Allow Permissions"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:234,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:226,columnNumber:7},void 0):null;return qe(()=>{c&&!u.current&&Se("notification-banner","center")},[c]),e.jsxDEV(Ve,{handleSubmit:T(oe),isLoading:ie,handleReset:re,configButtonProps:{isDisabled:!U},resetButtonProps:{isDisabled:!U},dataCy:"hubspot",children:[e.jsxDEV(V,{groupName:n({id:"AaxQrt",message:"INTEGRATION DETAILS"}),children:e.jsxDEV(x,{flexShrink:0,flex:1,maxW:"600px",children:e.jsxDEV(ke,{label:n({id:"OB1x2K",message:"Integration Name"}),required:!0,size:"sm",name:"name",borderRadius:"4px",height:"40px",error:s.name?.message,register:S,labelFieldOrientation:"horizontal",labelProps:{color:"gray.600"},"data-cy":"hubspot-configuration-integration-name-input"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:255,columnNumber:21},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:254,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:253,columnNumber:13},void 0),e.jsxDEV(V,{groupName:n({id:"192ElJ",message:"SYNC GALLABOX CONTACTS TO HUBSPOT"}),children:e.jsxDEV(h,{alignItems:"normal",gap:2,children:[e.jsxDEV(x,{align:"center",spacing:"0",children:[e.jsxDEV(h,{flex:"0.2",align:"flex-start",spacing:"0",children:e.jsxDEV(z,{fontSize:"sm",fontWeight:"medium",mb:0,color:"gray.600",flex:"0.7",children:e.jsxDEV(o,{id:"VdCb+x",message:"Create a new contact"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:275,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:274,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:273,columnNumber:25},void 0),e.jsxDEV(E,{flex:"0.3",children:e.jsxDEV(F,{control:d,name:"crmConfig.contact.syncOut",error:s?.crmConfig?.contact?.syncOut?.message,"data-cy":"hubspot-configuration-contact-sync-toggle"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:279,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:278,columnNumber:25},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:272,columnNumber:21},void 0),e.jsxDEV(v,{fontSize:14,fontWeight:"normal",color:"gray.600",children:e.jsxDEV(o,{id:"c/Q7fb",message:"Automatically create a new contact in HubSpot whenever someone starts a conversation, if the contact doesn't already exist."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:288,columnNumber:25},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:287,columnNumber:21},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:271,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:270,columnNumber:13},void 0),e.jsxDEV(V,{groupName:n({id:"yhnPBN",message:"UPDATE CONVERSATION HISTORY IN HUBSPOT"}),children:e.jsxDEV(h,{alignItems:"normal",gap:2,children:[e.jsxDEV(x,{align:"center",spacing:"0",children:[e.jsxDEV(h,{flex:"0.2",align:"flex-start",spacing:"0",children:e.jsxDEV(z,{fontSize:"sm",fontWeight:"medium",mb:0,color:"gray.600",flex:"0.7",children:e.jsxDEV(o,{id:"FX9sc5",message:"Log Resolved Conversations"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:300,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:299,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:298,columnNumber:25},void 0),e.jsxDEV(E,{flex:"0.3",children:e.jsxDEV(F,{control:d,name:"crmConfig.conversation.syncConversation",error:s?.crmConfig?.conversation?.syncConversation?.message,"data-cy":"hubspot-configuration-conversation-history-toggle"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:304,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:303,columnNumber:25},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:297,columnNumber:21},void 0),e.jsxDEV(v,{fontSize:14,fontWeight:"normal",color:"gray.600",children:e.jsxDEV(o,{id:"1pXcRj",message:"Automatically logs the full WhatsApp conversation as a note in the contact's HubSpot activity when marked as resolved 
1in Gallabox."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:313,columnNumber:25},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:312,columnNumber:21},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:296,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:295,columnNumber:13},void 0),e.jsxDEV(V,{groupName:n({id:"gEK8dw",message:"INCOMING MESSAGE CONFIGURATIONS"}),groupNameSiblingElement:[ce(),le()],children:a?e.jsxDEV(x,{spacing:4,children:[e.jsxDEV(E,{minW:10,h:10,display:"flex",alignItems:"center",justifyContent:"center",background:"gray.100",borderRadius:4,children:e.jsxDEV(j,{as:Te,w:5,h:5},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:335,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:326,columnNumber:25},void 0),e.jsxDEV(v,{fontSize:14,fontWeight:"normal",color:"gray.600",children:e.jsxDEV(o,{id:"iTggTq",message:"Receive signal notifications in HubSpot whenever a customer replies to your messages. This ensures you're always informed about incoming messages without needing to open the conversation widget, making it easier to respond promptly and stay on top of customer interactions."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:338,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:337,columnNumber:25},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:325,columnNumber:9},void 0):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(h,{alignItems:"normal",gap:2,children:[e.jsxDEV(x,{align:"center",spacing:"0",children:[e.jsxDEV(h,{flex:"0.2",align:"flex-start",spacing:"0",children:e.jsxDEV(z,{fontSize:"sm",fontWeight:"medium",mb:0,color:"gray.600",flex:"0.7",children:e.jsxDEV(o,{id:"oF/elC",message:"Notify on Incoming Message"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:352,columnNumber:41},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:351,columnNumber:37},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:350,columnNumber:33},void 0),e.jsxDEV(E,{flex:"0.3",children:e.jsxDEV(F,{control:d,name:"crmConfig.message.sendHubspotNotification",error:s?.crmConfig?.message?.sendHubspotNotification?.message,"data-cy":"hubspot-configuration-incoming-message-notifications-toggle"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:356,columnNumber:37},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:355,columnNumber:33},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:349,columnNumber:29},void 0),e.jsxDEV(v,{fontSize:14,fontWeight:"normal",color:"gray.600",children:e.jsxDEV(o,{id:"Y5/nZH",message:"Receive notifications in HubSpot whenever a customer replies to your messages."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:365,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:364,columnNumber:29},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:348,columnNumber:25},void 0),e.jsxDEV(Fe,{},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:370,columnNumber:25},void 0),e.jsxDEV(v,{fontWeight:"medium",color:"gray.600",children:e.jsxDEV(o,{id:"/IPfaz",message:"Channel setup"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:372,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:371,columnNumber:25},void 0),e.jsxDEV(x,{flexShrink:0,flex:1,maxW:"750px",alignItems:"baseline",children:e.jsxDEV(je,{label:n({id:"CXcvq4",message:"Channel name"}),error:s?.channelSelect?.message??s?.channelSelect?.[0]?.value?.message,formControlProps:{isRequired:!0,isInvalid:!!(s?.channelSelect?.message??s?.channelSelect?.[0]?.value?.message)},...Me,labelFieldOrientation:"horizontal",labelProps:{fontSize:"sm",fontWeight:"medium",mb:0,color:"gray.600",flex:.7},children:e.jsxDEV(ye,{control:d,name:"channelSelect",defaultValue:w?.channelSelect,"data-cy":"hubspot-configuration-incoming-message-notifications-channel-select",scrollIntoViewPosition:"center",isError:!!(s?.channelSelect?.message??s?.channelSelect?.[0]?.value?.message)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:398,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:375,columnNumber:29},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:374,columnNumber:25},void 0),c?e.jsxDEV(E,{backgroundColor:"blue.50",borderRadius:"lg",h:20,w:676,fontSize:12,mb:10,id:"notification-banner",children:e.jsxDEV(x,{p:4,align:"start",spacing:4,children:[e.jsxDEV(j,{as:de,w:4,h:4},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:422,columnNumber:37},void 0),e.jsxDEV(h,{align:"start",justifyContent:"center",children:[e.jsxDEV(v,{children:[e.jsxDEV(o,{id:"folE+w",message:"We’ve created a custom field in your HubSpot account to enable this feature."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:425,columnNumber:45},void 0)," "]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:424,columnNumber:41},void 0),e.jsxDEV(v,{children:[e.jsxDEV(o,{id:"Vqjq18",message:"Follow this guide to set up your HubSpot workflow for message notifications."},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:431,columnNumber:45},void 0),e.jsxDEV(Q,{module:"integrations",buttonType:"hyperlink",colorScheme:"brand",fontWeight:"medium",fontSize:"12px",link:"https://docs.gallabox.com/integration/customer-relationship-management-crm-systems/hubspot",rightIcon:e.jsxDEV(j,{as:G},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:444,columnNumber:32},void 0),children:e.jsxDEV(o,{id:"4zCf77",message:"View Setup Guide"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:446,columnNumber:49},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:435,columnNumber:45},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:430,columnNumber:41},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:423,columnNumber:37},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:421,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:412,columnNumber:11},void 0):null]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:347,columnNumber:9},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:320,columnNumber:13},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/Configuration.tsx",lineNumber:245,columnNumber:5},void 0)},{Box:J,Button:X,FormControl:Ge,FormLabel:Qe,HStack:Je,Input:Xe,InputGroup:Ke,useToast:Ze,VStack:Ye}=await N("@chakra-ui/react"),B=await N("react"),{useEffect:en,useState:K}=B,{useHistory:nn,useParams:tn}=await N("react-router-dom"),sn={id:"mPbgMq",message:"Gallabox App will automatically get created after the connection of HubSpot in Gallabox."},an=[{icon:we,textMsg:{id:"aqwVUz",message:"Send customized template messages"}}],on="calc(100% - 186px)",rn="0 3px 10px rgb(0 0 0 / 0.2)",cn=()=>{const{_:t}=$(),{integrationId:n}=tn(),r=q(),p=Y(),[i,a]=B.useState(0),{data:u,isLoading:c}=be({accountId:r,integrationId:n}),m=p.get("tab")??void 0,l={Overview:!1,Configuration:!n,Logs:!n};return B.useEffect(()=>{n||a(0),n&&a(1),isNaN(Number(m))||a(Number(m))},[n,m]),c?e.jsxDEV(Ye,{w:"full",height:"full",alignItems:"center",justify:"center",children:e.jsxDEV(Ie,{title:t({id:"+yD+Wu",message:"loading..."}),spinnerSize:20},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:53,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:52,columnNumber:5},void 0):e.jsxDEV(e.Fragment,{children:[e.jsxDEV(We,{currentpath:t({id:"w/33IE",message:"HubSpot"})},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:58,columnNumber:13},void 0),e.jsxDEV(J,{w:"full",children:e.jsxDEV(un,{integrationId:n},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:60,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:59,columnNumber:13},void 0),e.jsxDEV(J,{background:"gray.50",minHeight:on,children:e.jsxDEV(y,{hiddenTabs:l,activeIndex:i,integrationType:"hubspot",paddingBottom:!0,children:[e.jsxDEV(y.Overview,{children:e.jsxDEV(Re,{description:t(sn),details:an.map(g=>({...g,text:t(g.textMsg)}))},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:70,columnNumber:25},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:69,columnNumber:21},void 0),e.jsxDEV(y.Configuration,{children:e.jsxDEV(Ue,{integrationId:n,data:u,isLoading:c},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:73,columnNumber:25},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:72,columnNumber:21},void 0),e.jsxDEV(y.Logs,{children:e.jsxDEV(Oe,{accountId:r,integrationId:n,integrationType:"hubspot"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:76,columnNumber:25},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:75,columnNumber:21},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:63,columnNumber:17},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:62,columnNumber:13},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:57,columnNumber:5},void 0)},un=({integrationId:t})=>{const{_:n}=$(),[r,p]=K(""),i=q(),a=nn(),{mutateAsync:u}=ne({accountId:i}),[c,m]=K(!1),l=Y(),g=Ze({isClosable:!0,position:"bottom"}),{mutate:w}=Pe({accountId:i,integrationId:t});en(()=>{const s=l.get("user_id"),d=l.get("success");if(d&&s)if(d==="1"){const D=JSON.parse(De.Buffer.from(s,"base64").toString());D.integrationId&&a.push(`/integration/hubspot/edit/${D.integrationId}`)}else d==="0"&&(g({title:n({id:"QsDTFG",message:"Could not Integrate with HubSpot"}),status:"error"}),a.push("/integration/hubspot"))},[]);const S=async()=>{await w(),a.push("/integration")},T=async()=>{try{m(!0);const s=await u({name:r});s.uri&&window.open(s.uri,"_self"),s.integration&&a.replace(`/integration/hubspot/edit/${s.integration.id}`),p("")}catch{m(!1)}};return e.jsxDEV(Ae,{name:"hubspot",integrationName:n({id:"w/33IE",message:"HubSpot"}),integrationDescription:n({id:"1ueOQw",message:"Integrate with HubSpot and send personalised WhatsApp Messages to your HubSpot 
1Contacts"}),integrationLogo:He,integrationId:t,onIntegrationDelete:S,uiVersion:"v2",children:({onPopoverClose:s})=>e.jsxDEV(e.Fragment,{children:[e.jsxDEV(Ge,{children:[e.jsxDEV(Qe,{htmlFor:"email",children:e.jsxDEV(o,{id:"i+Jp3o",message:"Enter Integration Name"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:152,columnNumber:56},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:152,columnNumber:29},void 0),e.jsxDEV(Ke,{w:"100%",size:"sm",children:e.jsxDEV(Xe,{onChange:d=>p(d.target.value),id:"text",type:"text",isRequired:!0,placeholder:n({id:"OB1x2K",message:"Integration Name"})},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:154,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:153,columnNumber:29},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:151,columnNumber:25},void 0),e.jsxDEV(Je,{justify:"flex-end",py:3,children:[e.jsxDEV(X,{onClick:s,borderRadius:"xl",size:"sm",children:e.jsxDEV(o,{id:"dEgA5A",message:"Cancel"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:165,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:164,columnNumber:29},void 0),e.jsxDEV(X,{_hover:{backgroundColor:"#3364FA",boxShadow:rn},borderRadius:"xl",size:"sm",bg:"blue.500",color:"white",onClick:T,isLoading:c,children:e.jsxDEV("span",{children:e.jsxDEV(o,{id:"hQRttt",message:"Submit"},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:179,columnNumber:39},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:179,columnNumber:33},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:167,columnNumber:29},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:163,columnNumber:25},void 0)]},void 0,!0,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:150,columnNumber:11},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/HubspotDetails.tsx",lineNumber:139,columnNumber:5},void 0)},On=()=>e.jsxDEV(pe,{children:e.jsxDEV(cn,{},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/index.tsx",lineNumber:8,columnNumber:13},void 0)},void 0,!1,{fileName:"/vercel/path0/packages/web/src/app/screens/Integration/Hubspot/index.tsx",lineNumber:7,columnNumber:5},void 0);export{On as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.