1import{w as S,r as c,j as s}from"./chunk-UVKPFVEO-DQRsZm0K.js";import{A as f}from"./AtmosButton-tNZN2Tre.js";import{A as b}from"./AtmosCheckbox-B_fo_69W.js";import{A as d}from"./AtmosInput-CT8LzIxH.js";import{A as l}from"./AtmosSelect-BZ0mBa84.js";import{A as B}from"./AtmosContainer-fAzRm2kF.js";import{A as _}from"./AtmosAlert-DD6VdM83.js";import{T as k}from"./Tooltip-CHznYE4H.js";import"./index-sX-0ZSph.js";import{A as D}from"./AtmosAddressInput-F_ZkNRCl.js";import"./AtmosBasicInput-Dydvg-ez.js";import"./js.cookie-Cz0CWeBA.js";import{v as L,a as H}from"./helpersCommon-KRl3rUzT.js";import"./moment-C5S46NFB.js";import{u as F}from"./context-3cBkfvAg.js";import{S as M}from"./SignupStepError-DR2UwxRq.js";import"./react-number-format.es-D90bMWoj.js";import"./AtmosLabel-BgeKPQWb.js";import"./states-D9z66Nxz.js";import"./SearchLocationInput-D4qm_dD6.js";const oe=S(function(){const{totalSteps:g,stepConfig:h,user:y,holdingCompany:e,setHoldingCompany:n,requestInProgress:p,stepError:v}=F(),{holding_company:i}=h,[t,o]=c.useState({}),[m,j]=c.useState(!!e.doingBusinessAs),A=c.useCallback(a=>{n(r=>({...r,address:{...r.address,address_1:a.address_1,city:a.city,state:a.state,postal_code:a.postal_code}}))},[n]),N=p||!e.forbiddenActivity||!e.lineOfBusiness||!e.type||!e.businessName||!e.taxId||m&&!e.doingBusinessAs||!e.address.address_1||!e.address.city||!e.address.state||!e.address.postal_code||e.beneficialOwner&&!e.percentage||e.beneficialOwner&&!e.jobTitle,C=async a=>{var u,x;a.preventDefault();const r={};e.forbiddenActivity!=="NONE OF THESE APPLY"&&(r.forbiddenActivity="This industry is not allowed");const{valid:I,message:E}=L(e.taxId);I||(r.taxId=E),y.ssn===e.taxId&&(r.taxId="Business Tax ID cannot be the same as personal SSN.");const{valid:O,message:T}=H(e.address.postal_code);O||(r.postal_code=T),(x=(u=e.address)==null?void 0:u.state)!=null&&x.includes("-")&&(r.state="State is required");const{valid:w,message:P}=i.validatePercentage();if(w||(r.percentage=P),Object.keys(r).length>0){o(r);return}await i.onNext()};return s.jsxs(B,{padding:!0,children:[s.jsxs("p",{className:"text-sm font-semibold text-gray-500",children:["Step ",i.stepNumber," of ",g]}),s.jsx("h2",{className:"font-semibold text-lg mb-5",children:i.header}),i.subHeader&&s.jsx("p",{className:"text-gray-500 mb-5",children:i.subHeader}),s.jsxs("form",{className:"flex flex-col gap-y-5",children:[s.jsx(l,{name:"Do any of these situations apply to your business?",value:e.forbiddenActivity,onChange:a=>{o({...t,forbiddenActivity:null}),n({...e,forbiddenActivity:a})},options:[{name:""},{name:"Involved with in-person or internet gambling"},{name:"Involved in virtual currencies"},{name:"A controlled subtances related business"},{name:"A financial institution"},{name:"A shell company"},{name:"A payday lender"},{name:"NONE OF THESE APPLY"}],itemKey:"name",itemName:"name",error:t.forbiddenActivity}),![null,"NONE OF THESE APPLY",""].includes(e.forbiddenActivity)&&s.jsx(_,{severity:"warn",children:"Thank you for your interest. This industry is not permitted for Atmos banking services."}),s.jsx(d,{name:"Industry",value:e.lineOfBusiness,onChange:a=>n({...e,lineOfBusiness:a}),error:t.lineOfBusiness}),s.jsx(l,{name:"Business type",value:e.type,onChange:a=>n({...e,type:a}),options:[{body:"",value:""},{body:"LLC",value:"LLC"},{body:"Corporation",value:"Commercial"},{body:"Partnership",value:"Partnership"},{body:"Non-Profit",value:"Non-Profit"}],itemKey:"value",itemName:"body"}),s.jsx(d,{name:"Legal business name",value:e.businessName,onChange:a=>n({...e,businessName:a}),error:t.businessName}),s.jsxs("div",{className:"-mt-3",children:[s.jsx(b,{checked:m,onChange:a=>{j(a),a||n({...e,doingBusinessAs:""})},error:t.dba,text:"My business has a DBA"}),m&&s.jsx(d,{name:"Doing business as / Trade name",value:e.doingBusinessAs,onChange:a=>n({...e,doingBusinessAs:a}),error:t.doingBusinessAs})]}),s.jsxs("div",{className:"grid grid-cols-5 gap-x-2 gap-y-4",children:[["LLC"].includes(e.type)&&s.jsx("div",{className:"col-span-5 sm:col-span-1",children:s.jsx(l,{name:"Type",variant:"outlined",fullWidth:!0,value:e.taxIdType,onCh
1ange:a=>n({...e,taxIdType:a}),options:[{name:"EIN"}],itemKey:"name",itemName:"name"})}),s.jsx("div",{className:"col-span-5 sm:col-span-4",children:s.jsx(d,{value:e.taxId,onChange:a=>{o({...t,taxId:null}),n({...e,taxId:a})},name:"Tax ID",error:t.taxId,type:e.taxIdType==="SSN"?"ssn":"ein"})})]}),s.jsx(D,{address:e.address,setAddress:A,errors:t,setErrors:o,label:"Business address",description:i.addressDescription}),s.jsx("div",{className:"w-full",children:s.jsx(l,{name:"Your job title",value:e.jobTitle,onChange:a=>n({...e,jobTitle:a}),options:[{name:""},{name:"Chairman"},{name:"President"},{name:"Vice President"},{name:"Chief Operating Officer"},{name:"Treasurer"},{name:"Managing Member"},{name:"Member"},{name:"Partner"},{name:"Managing Partner"},{name:"Owner"},{name:"Executive Director"}],itemKey:"name",itemName:"name",error:t.jobTitle})}),s.jsx("div",{className:"w-full -mt-3 -mb-2",children:s.jsx(b,{checked:e.beneficialOwner,onChange:a=>{n({...e,beneficialOwner:a,percentage:a?e.percentage:""}),o({...t,percentage:null})},disabled:i.disableOwnerCheckbox,text:s.jsxs("div",{children:["Do you have 25% or more ownership interests of the company?",s.jsx(k,{title:"In most cases, nonprofits do not have beneficial owners."})]})})}),e.beneficialOwner&&s.jsx("div",{className:"w-4/5 ml-5 sm:w-2/5",children:s.jsx(d,{margin:"normal",id:"percentage",name:"Ownership percent",type:"number",min:"0",max:"100",value:e.percentage,autoFocus:!0,onChange:a=>{o({...t,percentage:null}),n({...e,percentage:a})},error:t.percentage})}),s.jsx("p",{className:"text-gray-500",children:i.legalCertification}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(f,{variant:"outlined",onClick:a=>{a.preventDefault(),i.onBack()},children:[s.jsx("ion-icon",{"aria-hidden":"true",name:"chevron-back"})," Back"]}),s.jsx(f,{type:"submit",onClick:C,disabled:N,loading:p,children:i.nextLabel})]})]}),s.jsx(M,{stepError:v})]})});export{oe 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.