'use strict';

// src/features/review/domain/presentation.ts
function truncateCommitSubject(subject) {
  if (subject.length <= 72) {
    return subject;
  }
  return `${subject.slice(0, 69)}...`;
}
function formatReviewTargetFileCount(fileCount) {
  return fileCount === 0 ? "\uBCC0\uACBD \uC5C6\uC74C" : `${fileCount}\uAC1C \uD30C\uC77C`;
}
function buildReviewTargetSummaryLine(target) {
  if (target.kind === "commit") {
    return `- ${target.hash} | ${target.subject} | ${target.author} | ${target.relativeDate}`;
  }
  return `- ${target.hash} | ${target.subject}`;
}
function buildReviewCommitSummary(targets) {
  return targets.map((target) => buildReviewTargetSummaryLine(target)).join("\n");
}
function buildReviewTargetSectionTitle(target) {
  return target.kind === "commit" ? `${target.hash} ${target.subject}` : `${target.hash} | ${target.subject}`;
}
function buildReviewSelectionHashes(targets) {
  return targets.map((target) => target.hash).join(", ");
}

exports.buildReviewCommitSummary = buildReviewCommitSummary;
exports.buildReviewSelectionHashes = buildReviewSelectionHashes;
exports.buildReviewTargetSectionTitle = buildReviewTargetSectionTitle;
exports.buildReviewTargetSummaryLine = buildReviewTargetSummaryLine;
exports.formatReviewTargetFileCount = formatReviewTargetFileCount;
exports.truncateCommitSubject = truncateCommitSubject;
