const PAGE_CARDS = [
    {
        key: 'proposal',
        icon: '📝',
        title: 'Proposal',
        description: 'Executive business proposal for stakeholders',
        filename: 'proposal.html',
    },
    {
        key: 'executive-summary',
        icon: '📊',
        title: 'Executive Summary',
        description: 'Cross-project overview: metrics, risks, and architecture',
        filename: 'executive-summary.html',
    },
    {
        key: 'roadmap',
        icon: '🗺️',
        title: 'Roadmap',
        description: 'Timeline and milestone planning across all specs',
        filename: 'roadmap.html',
    },
    {
        key: 'analytics',
        icon: '📈',
        title: 'Analytics',
        description: 'Velocity, estimates vs actuals, trend analysis',
        filename: 'analytics.html',
    },
    {
        key: 'risks',
        icon: '⚠️',
        title: 'Risks',
        description: 'Risk register and mitigation strategies',
        filename: 'risks.html',
    },
    {
        key: 'decisions',
        icon: '🏛️',
        title: 'Decisions',
        description: 'Architectural decisions log (ADRs)',
        filename: 'decisions.html',
    },
    {
        key: 'architecture',
        icon: '🔧',
        title: 'Architecture',
        description: 'System architecture diagrams and documentation',
        filename: 'architecture.html',
    },
    {
        key: 'changelog',
        icon: '📋',
        title: 'Changelog',
        description: 'Release history and change tracking',
        filename: 'changelog.html',
    },
];
function getLandingCardsCss() {
    return `
  .planu-quick-links {
    margin-bottom: 28px;
  }
  .planu-quick-links h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
  }
  .planu-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  .planu-page-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .planu-page-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #a5b4fc;
  }
  .planu-page-card.unavailable {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
  }
  .planu-card-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
  }
  .planu-card-body { flex: 1; min-width: 0; }
  .planu-card-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #111827;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .planu-card-desc {
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.4;
  }
  .planu-avail-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
  }
  .planu-avail-badge.available   { background: #d1fae5; color: #065f46; }
  .planu-avail-badge.unavailable { background: #f3f4f6; color: #9ca3af; }
  @media (max-width: 640px) {
    .planu-cards-grid { grid-template-columns: repeat(2, 1fr); }
  }`;
}
function escapeHtml(str) {
    return str
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;');
}
/**
 * Build the Quick Links section rendered between the navbar and the spec table
 * in planu/index.html. Cards that aren't yet generated are rendered greyed out.
 *
 * @param availablePages - Page keys that exist on disk (e.g. ['proposal', 'executive-summary']).
 */
export function buildQuickLinksSection(availablePages) {
    const availableSet = new Set(availablePages);
    const cards = PAGE_CARDS.map((card) => {
        const isAvailable = availableSet.has(card.key);
        const badgeClass = isAvailable ? 'available' : 'unavailable';
        const badgeLabel = isAvailable ? 'Available' : 'Not generated';
        const cardClass = isAvailable ? 'planu-page-card' : 'planu-page-card unavailable';
        const href = isAvailable ? escapeHtml(card.filename) : '#';
        return `<a href="${href}" class="${cardClass}" ${isAvailable ? '' : 'tabindex="-1" aria-disabled="true"'}>
  <div class="planu-card-icon">${card.icon}</div>
  <div class="planu-card-body">
    <div class="planu-card-title">
      ${escapeHtml(card.title)}
      <span class="planu-avail-badge ${badgeClass}">${badgeLabel}</span>
    </div>
    <div class="planu-card-desc">${escapeHtml(card.description)}</div>
  </div>
</a>`;
    }).join('\n');
    if (PAGE_CARDS.length === 0) {
        return '';
    }
    return `<style>${getLandingCardsCss()}</style>
<section class="planu-quick-links">
  <h2>Portal Pages</h2>
  <div class="planu-cards-grid">
${cards}
  </div>
</section>`;
}
//# sourceMappingURL=portal-landing-cards.js.map