1import{g as i,by as T,d as A,b as C,c as H,r as l,j as t,m as k,t as E,bD as I}from"./index-c3583149.js";import{H as R}from"./Helmet-57ab1286.js";import{k as D}from"./ProviderActions-2d6ade77.js";import{S as F}from"./SavedItemComponent-ae5205a6.js";import{R as z}from"./ReactHashLoader-ef260877.js";import"./index-34d6f644.js";import"./index.esm-e46207e9.js";import"./BasicPopup-86e3d869.js";import"./index-23ec7923.js";import"./EditPopup-6bb2d4f2.js";const O=i.div` 2 min-height: calc(100vh - 76px); 3 padding: 44px 24px 64px; 4 background: #f5f8fb; 5 6 @media (max-width: 700px) { 7 min-height: calc(100vh - 66px); 8 padding: 24px 16px 40px; 9 } 10`,B=i.main` 11 width: 100%; 12 max-width: 1400px; 13 margin: 0 auto; 14`,N=i.header` 15 padding-bottom: 22px; 16 border-bottom: 1px solid #c9d6e2; 17`,U=i.h1` 18 margin: 0; 19 color: #26374a; 20 font-family: var(--ff-secondary); 21 font-size: clamp(30px, 4vw, 38px); 22 font-weight: 700; 23 line-height: 1.2; 24`,_=i.p` 25 margin: 8px 0 0; 26 color: #53667d; 27 font-size: 16px; 28 line-height: 1.5; 29`,u=i.div` 30 display: flex; 31 flex-direction: column; 32 gap: 12px; 33 margin-top: 14px; 34`,$=i.p` 35 margin: 0; 36 padding: 28px; 37 border: 1px solid #c9d6e2; 38 border-radius: 12px; 39 background: #fff; 40 color: #53667d; 41 font-size: 15px; 42 line-height: 1.5; 43 text-align: center; 44`,V=i.div` 45 display: flex; 46 align-items: center; 47 justify-content: space-between; 48 width: 100%; 49 padding: 14px 0 0; 50`,q=i.div` 51 flex: 1; 52 53 @media (max-width: 700px) { 54 display: none; 55 } 56`,Q=i.div` 57 display: flex; 58 justify-content: flex-end; 59`,W=i.button` 60 display: inline-flex; 61 align-items: center; 62 gap: 8px; 63 min-height: 38px; 64 padding: 7px 12px; 65 border: 1px solid #b9c8d8; 66 border-radius: 8px; 67 background: #fff; 68 color: #354a62; 69 font-family: inherit; 70 cursor: pointer; 71 transition: border-color 0.15s ease, background-color 0.15s ease; 72 73 &:hover { 74 border-color: #8fa9c3; 75 background: #f7fafd; 76 } 77 78 &:focus-visible { 79 outline: 3px solid rgba(40, 120, 199, 0.2); 80 outline-offset: 2px; 81 } 82`,f=i.p` 83 margin: 0; 84 color: inherit; 85 font-size: 14px; 86 font-weight: 600; 87 user-select: none; 88`,G=i(T)` 89 user-select: none; 90`,J=()=>{const m=A(),b=C(),j=H(),[d,v]=l.useState(),[h,x]=l.useState(!1),[c,y]=l.useState(0),p=(()=>new URLSearchParams(b.search))().get("id"),w=async e=>{x(!0);try{const r=await D(e);v(r),await new Promise(o=>setTimeout(o,1e3))}catch(r){console.error("Failed to fetch data",r)}finally{x(!1)}};l.useEffect(()=>{p&&w(p)},[p]);const L=async(e,r)=>{const o={orgId:e,locationId:r},s=new URLSearchParams;Object.entries(o).forEach(([n,a])=>{s.set(n,a)}),j(`/provider-search?${s.toString()}`)},S=(e,r)=>{const o={orgId:e,locationId:r},s=new URLSearchParams;Object.entries(o).forEach(([n,a])=>{s.set(n,a)}),navigator.clipboard.writeText(`${k.url}provider-search?${s.toString()}`),E.success("url copied!")},P=e=>{m(I(e,"SingleOrgTemplate"))},g=(()=>{if(!d||!d.organizationFavoriteItems)return[];let e=[...d.organizationFavoriteItems];return c===1?e.sort((r,o)=>{var s,n,a;return((s=r.site)==null?void 0:s.isAdditional)===((n=o.site)==null?void 0:n.isAdditional)?0:(a=r.site)!=null&&a.isAdditional?1:-1}):c===2&&e.sort((r,o)=>{var s,n,a;return((s=r.site)==null?void 0:s.isAdditional)===((n=o.site)==null?void 0:n.isAdditional)?0:(a=r.site)!=null&&a.isAdditional?-1:1}),e})();return t.jsx(O,{children:h?t.jsx(z,{loading:h}):t.jsxs(B,{children:[t.jsxs(N,{children:[t.jsx(U,{children:d!=null&&d.name?d.name:"This List Does Not Exist"}),t.jsx(_,{children:"A provider list shared with you through Her PLAN."})]}),t.jsxs(V,{children:[t.jsx(q,{children:t.jsx(f,{children:"Provider"})}),t.jsx(Q,{children:t.jsxs(W,{type:"button","aria-label":"Change resource type sorting",onClick:()=>y(c==0?1:c==1?2:0),children:[t.jsx(f,{children:"Resource Type"}),t.jsx(G,{arrowType:"caret",start:c==0?-90:c==1?0:-180,end:0})]})})]}),g.length>0?t.jsx(u,{children:g.map((e,r)=>{var o,s,n;return t.jsx(F,{additional:(o=e==null?void 0:e.site)==null?void 0:o.isAdditional,title:(s=e==null?void 0:e.site)==null?void 0:s.name,address:(n=e==null?void 0:e.site)==null?void 0:n.address,noEdit:!0,buttonText:"View Provider",onButtonClick:()=>L(e.site.orgId,e.siteId),onShareClick:()=>S(e.site.orgId,e.siteId),onPrintClick:()=>P(e==null?void 0:e.site)},r)})}):t.jsx(u,{children:t.jsx($,{children:"This list is empty or no items match the filter criteria."})})]})})},de=()=>t.jsxs(t.Fragment,{children:[t.jsxs(R,{children:[t.jsx("title",{children:"Shared List - Her PLAN"}),t.jsx("meta",{name:"description",content:"Shared provider list."})]}),t.jsx(J,{})]});
90export{de 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.