import{O as u,b as e,j as r,aF as n,aG as x,B as o,q as s,E as l,af as b}from"./index-DlNZgIG9.js";const y=({address:a,isSelected:i,onSelect:p,title:d,error:m,redOnly:c=!1})=>{const t=u();return a?e(b,{elevation:0,sx:{p:2,mb:2,border:i?`2px solid ${t.palette.primary.main}`:m?`2px solid ${t.palette.error.main}`:`1px solid ${t.palette.divider}`,borderRadius:2,backgroundColor:i?n(t.palette.primary.main,.05):t.palette.background.paper,transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{borderColor:t.palette.primary.main,backgroundColor:n(t.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(l,{label:a.addressLine1,size:"small",variant:"outlined"}),a.streetName&&e(l,{label:a.streetName,size:"small",variant:"outlined"}),a.location&&e(l,{label:a.location,size:"small",variant:"outlined"}),a.district&&e(l,{label:a.district,size:"small",variant:"outlined"}),a.state&&e(l,{label:a.state,size:"small",variant:"outlined"}),a.country&&e(l,{label:a.country,size:"small",variant:"outlined"}),a.zipCode&&e(l,{label:a.zipCode,size:"small",variant:"outlined"})]})]})]})}):null};export{y as E};
