1import{a6 as m,j as e,aq as p,aA as x,b7 as _,aE as c,as as g,b3 as y}from"./vendor-DPFe_te2.js";import{j as b,R as f}from"./RenderResult-HggGVsOr.js";import{o as v,aY as j,ap as k}from"./index-DFbr7-Jt.js";import"./vendor-md-DlwECirW.js";function u(r){return r==="succeeded"?"done":r==="failed"||r==="canceled"?"failed":"running"}function N({status:r}){const s=u(r);return s==="done"?e.jsx("span",{className:"my-renders__badge my-renders__badge--done",children:"Pronto"}):s==="failed"?e.jsx("span",{className:"my-renders__badge my-renders__badge--failed",children:r==="canceled"?"Cancelado":"Falhou"}):e.jsxs("span",{className:"my-renders__badge my-renders__badge--running",children:[e.jsx(p,{size:12,className:"my-renders__spin","aria-hidden":"true"}),"Em andamento"]})}function z(r){return r?r==="INSUFFICIENT_POINTS"?"Saldo de pontos insuficiente. Nenhum ponto foi cobrado.":r.length>160?`${r.slice(0,157)}â¦`:r:"A geração falhou. Nenhum ponto foi cobrado."}function w(){const r=m(),{locale:s}=v(),{data:t=[],isLoading:h,error:d}=b();return h?e.jsxs("div",{className:"my-renders__state",children:[e.jsx(p,{size:20,className:"my-renders__spin","aria-hidden":"true"}),e.jsx("span",{children:"Carregando seus vÃdeosâ¦"}),e.jsx("style",{children:i})]}):d?e.jsxs("div",{className:"my-renders__state",children:[e.jsx("span",{children:d.message}),e.jsx("style",{children:i})]}):t.length===0?e.jsxs("div",{className:"my-renders__empty",children:[e.jsx("div",{className:"my-renders__empty-icon","aria-hidden":"true",children:e.jsx(x,{size:24,strokeWidth:1.6})}),e.jsx("h3",{children:"Nenhum vÃdeo ainda"}),e.jsx("p",{children:"Você ainda não gerou vÃdeos no Estúdio."}),e.jsxs("button",{type:"button",className:"my-renders__btn my-renders__btn--primary",onClick:()=>r("/estudio"),children:[e.jsx(_,{size:15,strokeWidth:1.8,"aria-hidden":"true"}),"Criar novo vÃdeo"]}),e.jsx("style",{children:i})]}):e.jsxs("div",{className:"my-renders",children:[t.map(n=>{const a=u(n.status),o=n.tier?j(n.tier).label:null,l=n.created_at?k(n.created_at,s,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"}):null;return e.jsxs("article",{className:"my-renders__item",children:[e.jsxs("div",{className:"my-renders__head",children:[e.jsx(N,{status:n.status}),e.jsxs("div",{className:"my-renders__meta",children:[o&&e.jsx("span",{children:o}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"my-renders__sep","aria-hidden":"true",children:"·"}),e.jsx("span",{children:l})]}),a==="done"&&n.points_charged!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"my-renders__sep","aria-hidden":"true",children:"·"}),e.jsxs("span",{children:[n.points_charged," pontos"]})]})]})]}),a==="done"&&n.final_video_url&&e.jsx(f,{job:n,size:"sm",actions:e.jsxs("button",{type:"button",className:"my-renders__btn my-renders__btn--ghost",onClick:()=>r(`/estudio/job/${n.id}`),children:[e.jsx(c,{size:15,strokeWidth:1.8,"aria-hidden":"true"}),"Ver"]})}),a==="running"&&e.jsxs("div",{className:"my-renders__row",children:[e.jsx("p",{className:"my-renders__hint",children:"A geração continua mesmo se você sair desta tela."}),e.jsxs("button",{type:"button",className:"my-renders__btn my-renders__btn--secondary",onClick:()=>r(`/estudio/job/${n.id}`),children:[e.jsx(c,{size:15,strokeWidth:1.8,"aria-hidden":"true"}),"Acompanhar"]})]}),a==="failed"&&e.jsxs("div",{className:"my-renders__row",children:[e.jsx("p",{className:"my-renders__error",children:z(n.error_message)}),e.jsxs("button",{type:"button",className:"my-renders__btn my-renders__btn--secondary",onClick:()=>r("/estudio"),children:[e.jsx(g,{size:15,strokeWidth:1.8,"aria-hidden":"true"}),"Tentar de novo"]})]})]},n.id)}),e.jsx("style",{children:i})]})}const i=` 2.my-renders { display: grid; gap: 14px; } 3.my-renders__item { 4 display: grid; gap: 12px; 5 padding: 16px; 6 background: var(--bg-card); 7 border: 1px solid var(--hairline-2); 8 border-radius: var(--r-lg, 16px); 9} 10.my-renders__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } 11.my-renders__meta { 12 display: inline-flex; align-items: center; gap: 6px; 13 font-size: 12.5px; color: var(--text-muted); 14} 15.my-renders__sep { color: var(--text-dim); } 16 17.my-renders__badge { 18 display: inline-flex; align-items: center; gap: 5px; 19 padding: 4px 10px; border-radius: 999px; 20 font-size: 11.5px; font-weight: 700; letter-spacing: -0.005em; 21} 22.my-renders__badge--running { background: var(--surface-3); color: var(--text); border: 1px solid var(--hairline-2); } 23.my-renders__badge--done { background: rgba(46,160,67,0.14); color: #2ea043; border: 1px solid rgba(46,160,67,0.3); } 24.my-renders__badge--failed { background: rgba(229,72,77,0.12); color: var(--danger, #e5484d); border: 1px solid rgba(229,72,77,0.3); } 25 26.my-renders__row { 27 display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; 28} 29.my-renders__hint { margin: 0; font-size: 12.5px; color: var(--text-muted); } 30.my-renders__error { margin: 0; font-size: 12.5px; color: var(--text); line-height: 1.45; flex: 1 1 240px; } 31 32.my-renders__spin { animation: mr-spin 0.8s linear infinite; } 33@keyframes mr-spin { to { transform: rotate(360deg); } } 34 35.my-renders__state { 36 display: grid; place-items: center; gap: 10px; 37 padding: 40px 16px; color: var(--text-muted); font-size: 13.5px; text-align: center; 38} 39 40.my-renders__empty { 41 display: grid; place-items: center; gap: 8px; 42 padding: 44px 20px; text-align: center; 43 background: var(--bg-card); 44 border: 1px solid var(--hairline-2); 45 border-radius: var(--r-lg, 16px); 46} 47.my-renders__empty-icon { 48 display: grid; place-items: center; 49 width: 52px; height: 52px; border-radius: 50%; 50 background: var(--surface-3); color: var(--brand-400); 51 margin-bottom: 4px; 52} 53.my-renders__empty h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); } 54.my-renders__empty p { margin: 0 0 8px; font-size: 13px; color: var(--text-muted); } 55 56.my-renders__btn { 57 display: inline-flex; align-items: center; justify-content: center; gap: 7px; 58 padding: 10px 18px; border-radius: 999px; 59 font-family: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: -0.005em; 60 cursor: pointer; border: 1px solid transparent; text-decoration: none; 61 transition: background 140ms, border-color 140ms, transform 130ms, opacity 130ms; 62} 63.my-renders__btn--primary { background: var(--brand-500); color: #0a0908; } 64.my-renders__btn--primary:hover { background: var(--brand-400); transform: translateY(-1px); } 65.my-renders__btn--secondary { background: var(--surface-3); color: var(--text); border-color: var(--hairline-2); } 66.my-renders__btn--secondary:hover { border-color: var(--hairline-3); } 67.my-renders__btn--ghost { background: transparent; color: var(--text); border-color: var(--hairline-2); } 68.my-renders__btn--ghost:hover { background: var(--surface-2); } 69`;function A(){const r=m();return e.jsxs("main",{className:"pf-page",children:[e.jsxs("button",{type:"button",className:"estudio__back",onClick:()=>r("/estudio"),children:[e.jsx(y,{size:16,"aria-hidden":"true"})," Estúdio"]}),e.jsxs("div",{className:"pf-head my-videos__head",children:[e.jsxs("div",{children:[e.jsxs("h1",{children:[e.jsx("span",{className:"estudio__title-icon","aria-hidden":"true",children:e.jsx(x,{size:22,strokeWidth:1.8})}),"Meus vÃdeos"]}),e.jsx("p",{children:"Os vÃdeos gerados no Estúdio. Baixe, acompanhe gerações ou crie um novo."})]}),e.jsxs("button",{type:"button",className:"my-videos__cta",onClick:()=>r("/estudio"),children:[e.jsx(_,{size:16,strokeWidth:1.8,"aria-hidden":"true"}),"Criar novo vÃdeo"]})]}),e.jsx(w,{}),e.jsx("style",{children:C})]})}const C=` 70.estudio__back { 71 display: inline-flex; align-items: center; gap: 6px; 72 background: transparent; border: none; 73 color: var(--text-muted); font-family: inherit; font-size: 13px; 74 cursor: pointer; padding: 4px 0; margin-bottom: 4px; 75 transition: color 130ms; 76} 77.estudio__back:hover { color: var(--text); } 78 79.pf-head h1 .estudio__title-icon { 80 display: inline-grid; place-items: center; 81 vertical-align: -4px; margin-right: 8px; 82 color: var(--brand-400); 83} 84 85.my-videos__head { 86 display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; 87} 88.my-videos__cta { 89 display: inline-flex; align-items: center; gap: 7px; 90 padding: 11px 20px; border-radius: 999px; flex-shrink: 0; 91 background: var(--brand-500); color: #0a0908; 92 font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.005em; 93 border: none; cursor: pointer; 94 transition: background 140ms, transform 130ms; 95} 96.my-videos__cta:hover { background: var(--brand-400); transform: translateY(-1px); } 97@media (max-width: 600px) { 98 .my-videos__head { flex-direction: column; } 99} 100`;export{A 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.