import{O as u,b as e,j as r,al as n,am as x,B as o,s,F as t,an as b}from"./index-BiWH3VAt.js";const y=({address:a,isSelected:i,onSelect:p,title:d,error:m,redOnly:c=!1})=>{const l=u();return a?e(b,{elevation:0,sx:{p:2,mb:2,border:i?`2px solid ${l.palette.primary.main}`:m?`2px solid ${l.palette.error.main}`:`1px solid ${l.palette.divider}`,borderRadius:2,backgroundColor:i?n(l.palette.primary.main,.05):l.palette.background.paper,transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{borderColor:l.palette.primary.main,backgroundColor:n(l.palette.primary.main,.02)},maxWidth:400},onClick:p,children:r(o,{sx:{display:"flex",alignItems:"flex-start",gap:2},children:[!c&&e(x,{checked:i,sx:{mt:.5}}),r(o,{sx:{flex:1},children:[e(s,{variant:"subtitle2",fontWeight:600,gutterBottom:!0,children:a.addressType||"Address"}),a.address&&e(s,{variant:"body2",color:"text.secondary",sx:{mb:1,wordBreak:"break-word"},children:a.address}),r(o,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:[a.addressLine1&&e(t,{label:a.addressLine1,size:"small",variant:"outlined"}),a.streetName&&e(t,{label:a.streetName,size:"small",variant:"outlined"}),a.location&&e(t,{label:a.location,size:"small",variant:"outlined"}),a.district&&e(t,{label:a.district,size:"small",variant:"outlined"}),a.state&&e(t,{label:a.state,size:"small",variant:"outlined"}),a.country&&e(t,{label:a.country,size:"small",variant:"outlined"}),a.zipCode&&e(t,{label:a.zipCode,size:"small",variant:"outlined"})]})]})]})}):null};export{y as E};
