import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1400, height: 1200 } });
await page.goto('http://localhost:3333/zh-TW/demo');
await page.waitForTimeout(3000);

// Scroll to HITL section
await page.evaluate(() => window.scrollBy(0, 500));
await page.waitForTimeout(1000);

await page.screenshot({ path: '/Users/ogt/awoooi/docs/screenshots/phase3-hitl-rbac.png' });
console.log('Screenshot 1 saved: phase3-hitl-rbac.png');

// Scroll more to see approval cards
await page.evaluate(() => window.scrollBy(0, 400));
await page.waitForTimeout(1000);

await page.screenshot({ path: '/Users/ogt/awoooi/docs/screenshots/phase3-approval-cards.png' });
console.log('Screenshot 2 saved: phase3-approval-cards.png');

await browser.close();
