import{b as t,H as r,j as o,B as n,s as m,ak as u,bg as c,aS as x,aR as h}from"./index-CYy8zBsj.js";const d=[{bg:"#E3F2FD",border:"#90CAF9",text:"#1565C0"},{bg:"#F3E5F5",border:"#CE93D8",text:"#7B1FA2"},{bg:"#E8F5E9",border:"#A5D6A7",text:"#2E7D32"},{bg:"#FFF3E0",border:"#FFCC80",text:"#E65100"},{bg:"#FCE4EC",border:"#F48FB1",text:"#C2185B"},{bg:"#E0F7FA",border:"#80DEEA",text:"#00838F"}],C=({variant:e,compact:l=!1})=>{var s;return(s=e==null?void 0:e.attributesDTOList)!=null&&s.length?t(n,{sx:{display:"flex",flexWrap:"wrap",gap:l?.4:.5,mt:l?.2:.5,alignItems:"center"},children:e.attributesDTOList.map((p,b)=>{const i=d[b%d.length];return t(r,{label:o(m,{component:"span",sx:{fontSize:l?"0.68rem":"0.73rem",fontWeight:600,letterSpacing:"0.02em",color:i.text},children:[o(n,{component:"span",sx:{fontWeight:500,opacity:.8},children:[p.name,":"]})," ",p.value]}),size:"small",sx:{height:l?20:22,borderRadius:"6px",border:`1px solid ${i.border}`,backgroundColor:i.bg,"& .MuiChip-label":{px:l?.6:.8,py:0}}},`${p.name}-${b}`)})}):null},F=({address:e,isSelected:l,onSelect:s,title:p,error:b,redOnly:i=!1})=>{const a=u();return e?t(h,{elevation:0,sx:{p:2,mb:2,border:l?`2px solid ${a.palette.primary.main}`:b?`2px solid ${a.palette.error.main}`:`1px solid ${a.palette.divider}`,borderRadius:2,backgroundColor:l?x(a.palette.primary.main,.05):a.palette.background.paper,transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{borderColor:a.palette.primary.main,backgroundColor:x(a.palette.primary.main,.02)},maxWidth:400},onClick:s,children:o(n,{sx:{display:"flex",alignItems:"flex-start",gap:2},children:[!i&&t(c,{checked:l,sx:{mt:.5}}),o(n,{sx:{flex:1},children:[t(m,{variant:"subtitle2",fontWeight:600,gutterBottom:!0,children:e.addressType||"Address"}),e.address&&t(m,{variant:"body2",color:"text.secondary",sx:{mb:1,wordBreak:"break-word"},children:e.address}),o(n,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:[e.addressLine1&&t(r,{label:e.addressLine1,size:"small",variant:"outlined"}),e.streetName&&t(r,{label:e.streetName,size:"small",variant:"outlined"}),e.location&&t(r,{label:e.location,size:"small",variant:"outlined"}),e.district&&t(r,{label:e.district,size:"small",variant:"outlined"}),e.state&&t(r,{label:e.state,size:"small",variant:"outlined"}),e.country&&t(r,{label:e.country,size:"small",variant:"outlined"}),e.zipCode&&t(r,{label:e.zipCode,size:"small",variant:"outlined"})]})]})]})}):null};export{F as E,C as V};
