import type {Project} from './catalog';
// Used only by the existing, explicit design-preview mode.
export function withMarketPreview(projects:Project[]):Project[] {
 return projects.map((project,index)=>{
  const start=[.972,1.013,.956,1.024][index%4];
  const points=Array.from({length:24},(_,i)=>Math.round(project.unit_price_rial*(start+(1-start)*i/23+Math.sin(i/23*Math.PI)*Math.sin(i*1.8)*.006)));
  points[0]=Math.round(project.unit_price_rial*start);points[23]=project.unit_price_rial;
  return {...project,is_demo:true,token_icon_url:project.token_icon_url||project.image_url,symbol:project.slug==='solar-horizon'?'eSOL':project.symbol,price_24h_ago_rial:points[0],price_history_24h:points,market_updated_at:'2026-09-08T00:00:00Z'};
 });
}
