1import{cl as f,j as e,r as o}from"./vendor-ct_YKIP6_bundle.js";import{ak as T,a as P,F as r,T as i,a8 as z,G as O,t as B,d as v,a4 as d,H as N,rP as M,jz as j,A as x,c as H,or as L,rQ as W,a5 as V,rR as b,ac as G,u as K,z as m,am as U,l as Y,ab as Q,ai as $}from"./registration-BfOA5mCx_bundle.js";import"./moment-DyvZl3Ud_bundle.js";import{C as q,a3 as g,ab as J}from"./slackIntegration-mZcBTumD_bundle.js";import{f5 as _,f6 as X,f7 as Z,f8 as ee,D as te,f9 as w,fa as ne,fb as k,fc as F,fd as oe,fe as se,ff as ie,fg as ae,fh as I,fi as C,fj as y,fk as E,fl as h,fm as le,fn as re,e_ as A}from"./index-BiagCLbs_bundle.js";import{A as ce}from"./constants-8nnvbpgF_bundle.js";import"./sentry-DLDmuXKN_bundle.js";import"./datadog-DxmyjtSX_bundle.js";import"./stripe-BA7RN6Z4_bundle.js";import"./speedboat-vendor-DBIVks5t_bundle.js";const pe="/assets/appfolio-benefit-one-BCYbYbVj.jpg",de="/assets/appfolio-benefit-two-1upGy3nH.jpg",fe="/assets/appfolio-benefit-three-DTM_pN35.jpg",ue=[{image:pe,labelKey:"appfolio.benefit_one"},{image:de,labelKey:"appfolio.benefit_two"},{image:fe,labelKey:"appfolio.benefit_three"}],he=({image:t,labelKey:n})=>e.jsxs(Z,{column:!0,alignItems:"center",gap:12,children:[e.jsx(ee,{src:t,alt:""}),e.jsx(i,{black:!0,size:"14px",children:B(n)})]}),me=()=>{const{t}=f(),{showModal:n}=T(),{mark:{base:a}}=P(),l=()=>
1{O.clickAppfolioConnect(a),n("AppfolioHowToConnectModal",{styleType:"light",disableOutsideClick:!0,heading:t("appfolio.how_to_connect_modal.title"),modalRootStyles:{width:"594px"}})};return e.jsxs(_,{all:20,children:[e.jsxs(r,{fullWidth:!0,justifyContent:"space-between",alignItems:"flex-start",gap:16,children:[e.jsxs(r,{direction:"column",gap:4,children:[e.jsx(i,{neutral900:!0,fontMedium:!0,size:"18px",children:t("appfolio.connect_title")}),e.jsx(i,{neutral900:!0,size:"14px",children:t("appfolio.connect_subtitle")})]}),e.jsx(z,{"data-testid":"appfolio-how-to-connect",offsetType:"compact",styleType:"brandCTA",type:"button",minWidth:160,onClick:l,children:t("appfolio.how_to_connect")})]}),e.jsx(X,{children:ue.map(s=>e.jsx(he,{image:s.image,labelKey:s.labelKey},s.labelKey))})]})},ge=t=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...t},o.createElement("path",{fill:"#54565D",d:"M5.853 9.853A4.51 4.51 0 0 0 4.206 16a4.51 4.51 0 0 0 6.147 1.647l1.594-.92a.614.614 0 1 0-.613-1.063l-1.595.92a3.263 3.263 0 0 1-4.47-1.197 3.263 3.263 0 0 1 1.197-4.471l1.595-.92a.614.614 0 1 0-.614-1.063zm6.2-3.58a.614.614 0 1 0 .613 1.063l1.595-.92a3.263 3.263 0 0 1 4.47 1.198 3.263 3.263 0 0 1-1.198 4.47l-1.594.92a.616.616 0 0 0-.072 1.025.61.61 0 0 0 .686.039l1.594-.92A4.51 4.51 0 0 0 19.794 7a4.51 4.51 0 0 0-6.147-1.647zm-4.788 7.253a.613.613 0 1 0 .613 1.062l8.857-5.113a.614.614 0 1 0-.613-1.063z"}),o.createElement("rect",{width:2.168,height:18.725,x:5.953,y:3.892,fill:"#54565D",stroke:"#fff",rx:1.084,transform:"rotate(-30 5.953 3.892)"})),xe=t=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...t},o.createElement("g",{clipPath:"url(#integration-custom-fields_svg__clip0_4693_83546)"},o.createElement("path",{stroke:"#54565D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 14V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4M9 7h6M9 11h6M9 15h4"}),o.createElement("g",{clipPath:"url(#integration-custom-fields_svg__clip1_4693_83546)"},o.createElement("path",{fill:"#54565D",d:"M17 15.668c1.787 0 3.276 1.012 4.444 2.98l.091.159.02.041.012.035.005.023.006.034.005.042v.046l-.006.046-.01.046-.017.045-.015.03-.007.013c-1.151 2.015-2.625 3.075-4.398 3.125l-.13.002c-1.832 0-3.349-1.062-4.528-3.127a.42.42 0 0 1 0-.413c1.18-2.065 2.696-3.127 4.528-3.127m0 2.083a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5"}))),o.createElement("defs",null,o.createElement("clipPath",{id:"integration-custom-fields_svg__clip0_4693_83546"},o.createElement("path",{fill:"#fff",d:"M0 0h24v24H0z"})),o.createElement("clipPath",{id:"integration-custom-fields_svg__clip1_4693_83546"},o.createElement("path",{fill:"#fff",d:"M12 14h10v10H12z"})))),S=({shouldShowCustomFields:t=!1})=>{const{t:n}=f(),{showModal:a,hideModal:l}=T(),s=v(),p=()=>a("AppfolioCustomFields",{styleType:"light",heading:n("appfolio.custom_fields.heading"),disableOutsideClick:!0,overflow:"visible"}),u=()=>a("ActionModal",{isDefaultHeadingHidden:!0,showCrossBtn:!1,disableOutsideClick:!0,autoWidth:!0,styleType:"light",data:{contentStyles:{padding:"20px",minHeight:"unset"},showFooterDelimiter:!0,content:e.jsx(i,{size:"18px",children:n("appfolio.disconnect_confirm")}),spinner:"disconnectIntegrationV3",cancelButton:n("common.cancel"),submitButton:n("common.disconnect"),cancelHandler:()=>l(),submitHandler:()=>{l(),s({type:x.DISCONNECT_INTEGRATION_V3_REQUEST,payload:{integrationKey:j,integrationName:M}})}}});return e.jsx(te,{placement:"bottom-end",anchor:()=>e.jsx(N,{style:{rotate:"90deg"},children:e.jsx(ne,{width:24,height:24})}),content:c=>e.jsxs(e.Fragment,{children:[e.jsx(d,{when:t,children:e.jsxs(w,{"data-testid":"appfolio-custom-fields-menu-item",onClick:()=>{c(!1),p()},children:[e.jsx(xe,{}),e.jsx(i,{children:n("appfolio.custom_fields.menu_item")})]})}),e.jsxs(w,{onClick:()=>{c(!1),u()},children:[e.jsx(ge,{}),e.jsx(i,{children:n("common.disconnect")})]})]})})},je=()=>{const{t}=f();return e.jsx(_,{all:20,children:e.jsxs(r,{gap:24,column:!0,children:[e.jsxs(r,{fullWidth:!0,justifyContent:"space-between",alignItems:"center",gap:16,children:[e.jsx(i,{neutral900:!0,fontMedium:!0,size:"18px",children:t("appfolio.connected_title")}),e.jsxs(r,{gap:8,children:[e.jsxs(k,{alignItems:"center",gap:8,"data-testid":"appfolio-connected-badge",children:[e.jsx(F,{}),e.jsx(i,{green600:!0,fontMedium:!0,size:"12px",children:t("appfolio.connected_badge")})]}),e.jsx(S,{})]})]}),e.jsxs(oe,{gap:16,alignItems:"center","data-testid":"appfolio-onboarding-banner",children:[e.jsx(se,{inline:!0,center:!0,children:e.jsx(ie,{width:16,height:16})}
1),e.jsx(i,{orange300:!0,uppercase:!0,semibold:!0,size:"14px",letterSpacing:"0.4px",children:t("appfolio.onboarding_checking")})]})]})})},_e=({data:t})=>{const{t:n}=f(),{dateFormat:a}=H(),l=t.connectedAt?L(t.connectedAt,a):"",s=t.postConnection,u=s?.status===ae.Completed&&W(s?.completedAt),c=s?.result??null,R=c?.jobsImported??0,D=c?.itemsImported??0;return e.jsxs(_,{all:20,children:[e.jsxs(r,{fullWidth:!0,justifyContent:"space-between",alignItems:"flex-start",gap:16,children:[e.jsxs(r,{direction:"column",gap:4,children:[e.jsx(i,{black:!0,semibold:!0,size:"18px",children:n("appfolio.connected_title")}),e.jsx(i,{neutral600:!0,size:"14px",children:n("appfolio.connected_on_with_subtitle",{date:l})})]}),e.jsxs(r,{alignItems:"center",gap:8,children:[e.jsx(d,{when:!!l,children:e.jsxs(k,{alignItems:"center",gap:8,"data-testid":"appfolio-connected-badge",children:[e.jsx(F,{}),e.jsx(i,{green600:!0,fontMedium:!0,size:"12px",children:n("appfolio.connected_badge")})]})}),e.jsx(S,{shouldShowCustomFields:!0})]})]}),e.jsx(d,{when:u,children:e.jsxs(I,{all:16,children:[e.jsxs(r,{gap:12,children:[e.jsxs(C,{column:!0,children:[e.jsx(y,{children:R}),e.jsx(E,{children:n("appfolio.jobs_imported")}),e.jsx(h,{to:"/jobs",children:n("appfolio.view_jobs")})]}),e.jsxs(C,{column:!0,children:[e.jsx(y,{children:D}),e.jsx(E,{children:n("appfolio.items_imported")}),e.jsx(h,{to:`/folder/${c?.folderId}/content`,children:n("appfolio.view_folder")})]})]}),e.jsx(V,{width:"100%",height:"1px",neutral200:!0,top:"16px",bottom:"16px"}),e.jsxs(r,{alignItems:"center",justifyContent:"space-between",gap:16,children:[e.jsx(i,{neutral700:!0,size:"14px",children:n("appfolio.guide")}),e.jsx(h,{"data-testid":"appfolio-view-guide",style:{marginTop:0},onClick:()=>window.open(b,"_blank","noopener,noreferrer"),children:n("appfolio.view_guide")})]})]})}),e.jsx(d,{when:!u,children:e.jsx(I,{all:16,children:e.jsxs(r,{alignItems:"center",justifyContent:"space-between",gap:16,children:[e.jsx(i,{neutral700:!0,size:"14px",children:n("appfolio.guide")}),e.jsx(h,{"data-testid":"appfolio-view-guide",style:{marginTop:0},onClick:()=>window.open(b,"_blank","noopener,noreferrer"),children:n("appfolio.view_guide")})]})})})]})},be=()=>{const t=Y(l=>l.integrationsV3.byKey[j]?.data??null),{fetchIntegrationV3:n}=Q(),a=o.useRef(!1);return o.useEffect(()=>{a.current||n||!t||(a.current=!0,O.viewIntegrationPage({integration:M}))},[n,t]),le(t),re(t),n?e.jsx($,{}):t?.state===A.Onboarding?e.jsx(je,{}):t?.state===A.Connected?e.jsx(_e,{data:t}):e.jsx(me,{})},Me=()=>{const{t}=f(),n=v(),{planFeatures:a,mark:{base:l}}=P(),{featureFlags:s}=G(),{locationReplace:p}=K();return o.useEffect(()=>{m(s)&&!s?.enableAppfolioIntegration&&p("/integrations")},[s,p]),o.useEffect(()=>{if(!(m(s)&&!s?.enableAppfolioIntegration)&&m(a)){if(!a.appfolioIntegrationEnabled){n({type:x.SHOW_POPUP,popupType:U.APPFOLIO_INTEGRATION,meta:{plan:l,when:"after",featureInfo:ce}});return}n({type:x.FETCH_INTEGRATION_V3_REQUEST,payload:{integrationKey:j}})}},[n,l,s,a]),e.jsxs(q,{$greyBg:!0,children:[e.jsx(g.DefaultHeader,{innerDelimiter:!0,offsets:{pt:32},children:e.jsxs(g.HeaderContent,{left:0,maxWidth:954,right:0,children:[e.jsx(J,{}),e.jsx(i,{as:"h1",children:t("appfolio.headline")})]})}),e.jsx(g.Body,{left:0,maxWidth:954,right:0,children:e.jsx(d,{when:!!a?.appfolioIntegrationEnabled,children:e.jsx(be,{})})})]})};export{Me as default}; 2//# sourceMappingURL=appfolioIntegration-Bm3y5ows_bundle.js.map
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.