import{u as v,j as r,g as o}from"./index-B48HCCvn.js";import{A as h}from"./arrow-left-D8mdzO_t.js";function N({items:n,selectedId:t,onSelectItem:c,getItemId:l,renderListItem:d,renderDetail:u,renderListFooter:g,mobileShowDetail:a,onMobileBack:x,listClassName:f,detailClassName:p}){const{t:m}=v(),b=n.find(e=>l(e)===t)??null;return r.jsxs("div",{className:"grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)] lg:h-[calc(100vh-16rem)] lg:max-h-[640px]",children:[r.jsxs("div",{className:o("space-y-1 lg:overflow-y-auto lg:pr-1 scrollbar-app-thin",a&&"hidden lg:block",f),children:[n.map(e=>{const s=l(e),i=s===t;return r.jsx("button",{onClick:()=>c(s),"aria-current":i?"true":void 0,className:o("flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted/50"),children:d(e,i)},s)}),g?.()]}),r.jsxs("div",{className:o("rounded-xl border border-border bg-card lg:overflow-y-auto scrollbar-app-thin",!a&&"hidden lg:block",p),children:[r.jsxs("button",{onClick:x,className:"mb-4 flex items-center gap-1.5 px-5 pt-3 text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 lg:hidden",children:[r.jsx(h,{size:14}),m("返回列表")]}),u(b)]})]})}export{N as S};
