1import{a5 as f,ae as y,k as w,I as e,K as m,a2 as v,Q as i,a8 as C,a1 as A}from"./index-CL6DkWfS.js";import{B as k}from"./Breadcrumbs-Bv_kUyUh.js";import{T as S,a as T,b as P,c as $}from"./Tooltip-BZ9H_RjY.js";import{I as D}from"./IconAvatar-CSsrpA7N.js";import{C as p}from"./circle-play-DtWeEssS.js";import{C as F}from"./calendar-BHCrnYam.js";import{S as I}from"./settings-tZYRGWWS.js";import{C as L}from"./chart-column-Ckl4fKn_.js";import{M}from"./mouse-pointer-CNC5Ujmw.js";import{T as R}from"./trending-up-DvZ39NMS.js";import{U as B}from"./users-Dq6kRe98.js";import{C as E}from"./circle-check-big-BUBqOzuO.js";import{C as U}from"./clock-HDPMeSg8.js";import{M as V}from"./message-circle-DXsAp3Gs.js";import"./index-lBy5VtNw.js";const _=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],h=f("circle-pause",_),x=[{id:"1",name:"Tyler_FPS",avatar:"https://i.pravatar.cc/150?u=tyler",platform:"Twitch",followers:35e4,status:"active",impressions:285e3,clicks:4275,spend:2422.5,ctr:1.5},{id:"2",name:"ProGamerMike",avatar:"https://i.pravatar.cc/150?u=mike",platform:"Twitch",followers:52e4,status:"active",impressions:42e4,clicks:6720,spend:4284,ctr:1.6},{id:"3",name:"EsportsChris",avatar:"https://i.pravatar.cc/150?u=chris",platform:"Twitch",followers:12e5,status:"active",impressions:98e4,clicks:15680,spend:14700,ctr:1.6},{id:"4",name:"SpeedrunnerEmma",avatar:"https://i.pravatar.cc/150?u=emma",platform:"Twitch",followers:28e4,status:"pending",impressions:0,clicks:0,spend:0,ctr:0}],c=s=>s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(0)}K`:s.toString();function se(){const{id:s}=y(),d=s||"1",[u,b]=w.useState("active"),a={name:"FPS Championship Launch Q1 2026",status:u,budget:5e4,startDate:"2025-12-15",endDate:"2026-01-31"},l=x.reduce((t,r)=>t+r.impressions,0),o=x.reduce((t,r)=>t+r.clicks,0),n=x.reduce((t,r)=>t+r.spend,0),g=l>0?o/l*100:0,j=l>0?n/l*1e3:0,N=Math.ceil((new Date(a.endDate).getTime()-new Date().getTime())/(1e3*60*60*24));return e.jsxs("div",{className:"min-h-screen bg-[#151515] text-neutral-white",children:[e.jsx("div",{className:"border-b border-neutral-700 bg-[#1A1A1A] px-8 py-6",children:e.jsxs("div",{className:"mx-auto max-w-[1440px]",children:[e.jsx(k,{items:[{label:"Dashboard",href:"/brand/dashboard"},{label:"Campaigns",href:"/brand/campaigns"},{label:a.name}],className:"mb-4"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[e.jsx("h1",{className:"text-[40px] font-bold",children:a.name}),e.jsxs("span",{className:`flex items-center gap-1 rounded-full px-3 py-1 text-[12px] font-medium ${a.status==="active"?"bg-warning-green-500/10 text-warning-green-500":"bg-warning-orange-500/10 text-warning-orange-500"}`,children:[a.status==="active"?e.jsx(p,{className:"h-3 w-3"}):e.jsx(h,{className:"h-3 w-3"}),a.status==="active"?"Active":"Paused"]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-[14px] text-neutral-400",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"h-4 w-4"}),new Date(a.startDate).toLocaleDateString()," -"," ",new Date(a.endDate).toLocaleDateString()]}),e.jsxs("span",{children:[N," days remaining"]})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(S,{children:e.jsxs(T,{children:[e.jsx(P,{asChild:!0,children:e.jsxs(m,{to:`/brand/campaigns/${d}/contract`,className:"flex items-center gap-2 rounded-lg bg-cyan px-6 py-3 text-[16px] font-bold text-dark hover:bg-cyan/90 transition-colors shadow-lg shadow-cyan/20","data-testid":"view-contract-btn",children:[e.jsx(v,{className:"h-5 w-5"}),"View Contract"]})}),e.jsx($,{side:"bottom",children:e.jsx("p",{children:"View CPM pricing, terms & sign contract"})})]})}),e.jsx("button",{onClick:()=>b(a.status==="active"?"paused":"active"),className:"flex items-center gap-2 rounded-lg border border-neutral-700 px-6 py-3 text-[16px] font-medium text-neutral-white hover:border-brand-base",children:a.status==="active"?e.jsxs(e.Fragment,{children:[e.jsx(h,{className:"h-5 w-5"}),"Pause Campaign"]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"h-5 w-5"}),"Resume Campaign"]})}),e.jsxs("button",{className:"flex items-center gap-2 rounded-lg border border-neutral-700 px-6 py-3 text-[16px] font-medium text-neutral-white hover:border-brand-base",children:[e.jsx(I,{className:"h-5 w-5"}),"Edit"]}),e.jsxs(m,{to:`/brand/campaigns/${d}/analytics`,className:"flex items-center gap-2 rounded-lg bg-brand-base px-6 py-3 text-[16px] font-medium text-[#151515] hover:opacity-90",children:[e.jsx(L,{className:"h-5 w-5"}),"View Analytics"]})]})]})]})}),e.jsxs("div",{className:"mx-auto max-w-[1440px] px-8 py-8",children:[e.jsxs("div",{className:"mb-8 grid grid-cols-5 ga
1p-6",children:[e.jsxs(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsx(C,{className:"mb-3 h-6 w-6 text-brand-base"}),e.jsx("p",{className:"mb-1 text-[28px] font-bold text-neutral-white",children:c(l)}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:"Total Impressions"})]}),e.jsxs(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.05},className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsx(M,{className:"mb-3 h-6 w-6 text-brand-base"}),e.jsx("p",{className:"mb-1 text-[28px] font-bold text-neutral-white",children:c(o)}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:"Total Clicks"})]}),e.jsxs(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsx(R,{className:"mb-3 h-6 w-6 text-brand-base"}),e.jsxs("p",{className:"mb-1 text-[28px] font-bold text-neutral-white",children:[g.toFixed(2),"%"]}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:"Click-Through Rate"})]}),e.jsxs(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsx(A,{className:"mb-3 h-6 w-6 text-brand-base"}),e.jsxs("p",{className:"mb-1 text-[28px] font-bold text-neutral-white",children:["$",n.toLocaleString()]}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:"Total Spend"})]}),e.jsxs(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsx("div",{className:"mb-3 text-[24px] font-bold text-brand-base",children:"$"}),e.jsxs("p",{className:"mb-1 text-[28px] font-bold text-neutral-white",children:["$",j.toFixed(2)]}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:"Actual CPM"})]})]}),e.jsxs("div",{className:"mb-8 rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h3",{className:"text-[20px] font-bold text-neutral-white",children:"Budget Progress"}),e.jsxs("div",{className:"flex gap-6 text-[14px]",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-neutral-400",children:"Budget: "}),e.jsxs("span",{className:"font-bold text-neutral-white",children:["$",a.budget.toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-neutral-400",children:"Spent: "}),e.jsxs("span",{className:"font-bold text-brand-base",children:["$",n.toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-neutral-400",children:"Remaining: "}),e.jsxs("span",{className:"font-bold text-warning-green-500",children:["$",(a.budget-n).toLocaleString()]})]})]})]}),e.jsx("div",{className:"h-4 overflow-hidden rounded-full bg-neutral-700",children:e.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-brand-base to-warning-green-500",style:{width:`${n/a.budget*100}%`}})}),e.jsxs("p",{className:"mt-2 text-[14px] text-neutral-400",children:[(n/a.budget*100).toFixed(1),"% of budget used"]})]}),e.jsxs("div",{className:"rounded-xl border border-neutral-700 bg-[#1A1A1A] p-6",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("h3",{className:"text-[20px] font-bold text-neutral-white",children:["Campaign Influencers (",x.length,")"]}),e.jsxs("button",{className:"flex items-center gap-2 rounded-lg bg-brand-base px-4 py-2 text-[14px] font-medium text-[#151515] hover:opacity-90",children:[e.jsx(B,{className:"h-4 w-4"}),"Add Influencers"]})]}),e.jsx("div",{className:"overflow-hidden rounded-lg border border-neutral-700",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[#151515]",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-[12px] font-medium text-neutral-400",children:"Influencer"}),e.jsx("th",{className:"px-4 py-3 text-left text-[12px] font-medium text-neutral-400",children:"Status"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"Followers"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"Impressions"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"Clicks"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"CTR"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"Spend"}),e.jsx("th",{className:"px-4 py-3 text-right text-[12px] font-medium text-neutral-400",children:"Actions"})]})}),e.jsx("tbody",{children:x.map((t,r)=>e.jsxs(i.tr,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:r*.05},className:"border-t border-neutral-700 hover:bg-[#151515]",children:[e.jsx("td",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(D,{size:"md",name:t.name}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[14px] font-medium text-neutral-white",children:t.name}),e.jsx("p",{className:"text-[12px] text-neutral-400",children:t.platform})]})]})}),e.jsx("td",{className:"px-4 py-4",children:e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium ${t.status==="active"?"bg-warning-green-500/10 text-warning-green-500":t.status==="pending"?"bg-warning-orange-500/10 text-warning-orange-500":"bg-neutral-700/10 text-neutral-400"}`,children:[t.status==="active"&&e.jsx(E,{className:"h-3 w-3"}),t.status==="pending"&&e.jsx(U,{className:"h-3 w-3"}),t.status]})}),e.jsx("td",{className:"px-4 py-4 text-right text-[14px] text-neutral-white",children:c(t.followers)}),e.jsx("td",{className:"px-4 py-4 text-right text-[14px] text-neutral-white",children:c(t.impressions)}),e.jsx("td",{className:"px-4 py-4 text-right text-[14px] text-neutral-white",children:c(t.clicks)}),e.jsx("td",{className:"px-4 py-4 text-right text-[14px] font-medium text-brand-base",children:t.ctr>0?`${t.ctr.toFixed(2)}%`:"-"}),e.jsxs("td",{className:"px-4 py-4 text-right text-[14px] font-bold text-neutral-white",children:["$",t.spend.toLocaleString()]}),e.jsx("td",{className:"px-4 py-4 text-right",children:e.jsx("button",{className:"rounded-lg p-2 text-neutral-400 hover:bg-[#151515] hover:text-neutral-white",children:e.jsx(V,{className:"h-4 w-4"})})})]},t.id))})]})})]})]})]})}export{se as BrandCampaignsDetail,se 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.