export function generateTitlePageHtml(metadata) {
    if (!metadata.includeTitlePage)
        return '';
    return `
    <div class="book-title-page">
      <div class="title-page-content">
        <h1 class="book-main-title">${escapeHtml(metadata.title)}</h1>
        ${metadata.subtitle ? `<h2 class="book-main-subtitle">${escapeHtml(metadata.subtitle)}</h2>` : ''}
        <div class="title-page-spacer"></div>
        <p class="book-author-name">${escapeHtml(metadata.author)}</p>
        ${metadata.imprint ? `<p class="book-imprint-name">${escapeHtml(metadata.imprint)}</p>` : ''}
      </div>
    </div>
    <div class="book-page-break"></div>
  `;
}
export function generateCopyrightPageHtml(metadata) {
    if (!metadata.includeCopyrightPage)
        return '';
    const year = metadata.copyrightYear || new Date().getFullYear();
    const holder = metadata.copyrightHolder || metadata.author;
    return `
    <div class="book-copyright-page">
      <div class="copyright-page-content">
        <p class="copyright-line">Copyright © ${year} by ${escapeHtml(holder)}</p>
        <p>All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without prior written permission of the publisher.</p>
        ${metadata.imprint ? `<p class="imprint-line">Published by ${escapeHtml(metadata.imprint)}</p>` : ''}
        ${metadata.website ? `<p class="website-line">${escapeHtml(metadata.website)}</p>` : ''}
        ${metadata.publisherContact ? `<p class="contact-line">${escapeHtml(metadata.publisherContact)}</p>` : ''}
        <p class="edition-line">First 6×9 Physical Book Edition</p>
      </div>
    </div>
    <div class="book-page-break"></div>
  `;
}
function escapeHtml(text) {
    return text
        .replace(/&/g, '&amp;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/"/g, '&quot;')
        .replace(/'/g, '&#039;');
}
//# sourceMappingURL=frontmatter.js.map