"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[289],{289:function(a,e,l){l.r(e),l.d(e,{BRAForm:function(){return v}});var s=l(57913),u=l(67879);let r=[{displayValue:"Acre",value:"AC"},{displayValue:"Alagoas",value:"AL"},{displayValue:"Amap\xe1",value:"AP"},{displayValue:"Amazonas",value:"AM"},{displayValue:"Bahia",value:"BA"},{displayValue:"Cear\xe1",value:"CE"},{displayValue:"Distrito Federal",value:"DF"},{displayValue:"Esp\xedrito Santo",value:"ES"},{displayValue:"Goi\xe1s",value:"GO"},{displayValue:"Maranh\xe3o",value:"MA"},{displayValue:"Mato Grosso",value:"MT"},{displayValue:"Mato Grosso do Sul",value:"MS"},{displayValue:"Minas Gerais",value:"MG"},{displayValue:"Par\xe1",value:"PA"},{displayValue:"Para\xedba",value:"PB"},{displayValue:"Paran\xe1",value:"PR"},{displayValue:"Pernambuco",value:"PE"},{displayValue:"Piau\xed",value:"PI"},{displayValue:"Rio de Janeiro",value:"RJ"},{displayValue:"Rio Grande do Norte",value:"RN"},{displayValue:"Rio Grande do Sul",value:"RS"},{displayValue:"Rond\xf4nia",value:"RO"},{displayValue:"Roraima",value:"RR"},{displayValue:"Santa Catarina",value:"SC"},{displayValue:"S\xe3o Paulo",value:"SP"},{displayValue:"Sergipe",value:"SE"},{displayValue:"Tocantins",value:"TO"}];var d=l(32017),o=l(79826),t=l(80337),i=l(11079),n=l(50827);let p=/^([\d]{5})-?([\d]{3})$/,v=a=>{let{formMethods:e,isDisabled:l}=a,v=(0,u.Z)(),{control:m}=e,y=[{displayValue:"",value:""},...r];return(0,s.jsxs)("div",{className:n.c,children:[(0,s.jsx)(o.F,{disabled:l,label:v.formatMessage(i.O.street),name:"address.street",control:m,rules:{required:(0,t.C1)({intl:v,name:"street"})}}),(0,s.jsx)(o.F,{disabled:l,label:v.formatMessage(i.O.complement),name:"address.complement",control:m,rules:{maxLength:(0,t.BS)({intl:v,name:"complement",maxLength:750})}}),(0,s.jsx)(d.h,{disabled:l,optionList:y,label:v.formatMessage(i.O.state),name:"state"}),(0,s.jsx)(o.F,{disabled:l,label:v.formatMessage(i.O.city),name:"address.city",control:m}),(0,s.jsx)(o.F,{disabled:l,label:v.formatMessage(i.O.postalCode),name:"address.postalCode",control:m,rules:{required:(0,t.C1)({intl:v,name:"postalCode"}),maxLength:(0,t.BS)({intl:v,name:"postalCode",maxLength:50}),pattern:(0,t.uj)({intl:v,name:"postalCode",regex:p})}})]})}},79826:function(a,e,l){l.d(e,{F:function(){return d}});var s=l(57913),u=l(27351),r=l(65834);let d=(0,l(74979).forwardRef)(function(a,e){var l;let{label:d,...o}=a,{name:t,control:i,defaultValue:n,disabled:p,rules:v,shouldUnregister:m,id:y,...V}=o,{field:c,formState:{errors:b}}=(0,r.bc)({name:t,control:i,defaultValue:n,disabled:p,rules:v,shouldUnregister:m}),f=(0,u.qq)(c.ref,e),h=null!==(l=t.split(".")[1])&&void 0!==l?l:t,S=!!b.address&&Object.prototype.hasOwnProperty.call(b.address,h);return(0,s.jsxs)(u.ai,{children:[(0,s.jsx)(u.oi,{label:d,error:S,...V,...c,ref:f}),(0,s.jsx)(u.Xq,{errors:b,name:t,id:y})]})})}}]);