1import{j as e}from"./react-CaZ3b-uf.js";import{O as l,L as d}from"./tanstack-router-DdV6ARKN.js";import{T as m}from"./Tabs-esCghu8b.js";import{e5 as p,e6 as f,e7 as x,bk as u,M as n,au as g,W as j}from"./tanstack-start-BzM2Ciq7.js";import{f as b}from"./format-date-W2yvSjZN.js";import{H as h}from"./HeaderActions-D3uDFMRX.js";import{u as y}from"./LicenseDownloadButton-BjN82Qgj.js";import"./tanstack-CzaH6mfd.js";import"./radix-accordion-B9Cw5kfI.js";import"./radix-dialog-CRaAAOVD.js";import"./radix-menu-D_9sKf4A.js";import"./radix-select-Cz5S0Opm.js";import"./radix-navigation-menu-DkxGYPh1.js";import"./sonner-D-uFVvD1.js";import"./lucide-CqZJRsZM.js";import"./tanstack-query-CWWMDizP.js";import"./ui-utils-Bj2vDxdV.js";import"./unpic-CfMFyugp.js";import"./dayjs.min-B18_USV6.js";import"./dayjs.min-CNb6fNES.js";import"./relativeTime-DaRORkPP.js";import"./tooltip-NOn_b0Tf.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="8de07852-9b21-4a4e-a485-eed15c303dd1",s._sentryDebugIdIdentifier="sentry-dbid-8de07852-9b21-4a4e-a485-eed15c303dd1")}catch{}})();const N=({userSong:s})=>{const t=s.samples[0],a=y(s),o=p(s),i=[...a?[a]:[],...o];
1return e.jsx("div",{className:"flex flex-col gap-4 rounded-md bg-card p-6",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"truncate text-foreground text-heading-md",children:s.song_title||"Untitled"}),e.jsx(f,{userSong:s})]}),t&&e.jsxs("p",{className:"truncate text-body-sm text-muted-foreground",children:["Samples"," ",e.jsx("span",{className:"text-foreground",children:t.song.title})," ","by ",t.song.artists.map(c=>c.name).join(", ")]}),s.license_activation_date&&e.jsxs("p",{className:"text-body-sm text-muted-foreground",children:["Activated"," ",e.jsx("span",{className:"text-foreground",children:b(s.license_activation_date)})]})]}),e.jsx("div",{className:"ml-auto flex flex-wrap items-center justify-end gap-2",children:e.jsx(h,{actions:i,overflowLabel:"License actions",overflowTestId:"license-actions-dropdown"})})]})})},r=()=>e.jsxs(d,{className:"flex items-center gap-2 text-body-sm text-muted-foreground transition-opacity hover:opacity-80",to:n({name:"licenses"}),children:[e.jsx(j,{className:"size-5"}),"Back to licenses"]}),q=()=>{const{userSongId:s}=x.useParams(),t=Number(s),{data:a,isError:o}=u(t),i=[{label:"License Details",href:n({name:"license-detail",userSongId:s})},{label:"Revenue History",href:n({name:"license-detail-revenue",userSongId:s})}];return o||!(Number.isFinite(t)&&t>0)?e.jsxs("div",{className:"flex flex-col items-start gap-4",children:[e.jsx(r,{}),e.jsx("p",{className:"text-foreground",children:"License not found."})]}):e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-6",children:[e.jsx(r,{}),a?e.jsx(N,{userSong:a}):e.jsx(g,{className:"h-32 w-full rounded-md"}),e.jsx(m,{items:i}),e.jsx(l,{})]})};export{q as component};
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.