namespace EnvelopeGenerator.ReceiverUI.Models;
///
/// Represents a captured signature with metadata created by the receiver in the signature popup.
/// This model holds the signature image (as base64 data URL) along with signer information
/// used for rendering applied signatures on the PDF canvas.
///
///
/// Used in: EnvelopeViewer.razor signature popup workflow
///
/// Creation: User draws/types/uploads signature and fills required fields
///
/// Storage: Session-only (Blazor component state, lost on page refresh)
///
/// Rendering: Applied signatures display: Image + Separator + Name/Position/Place/Date
///
public sealed record SignatureCaptureDto
{
///
/// Base64-encoded data URL of the signature image.
///
/// Format: data:image/png;base64,iVBORw0KG...
///
/// Source: Canvas.toDataURL() from signature pad (draw/text/image tabs)
///
/// Usage: Set as img.src in applied signature overlay
///
public required string DataUrl { get; init; }
///
/// Full name of the signer (first and last name).
///
/// Required: Yes (validated in popup)
///
/// Display: Bold text in applied signature block
///
/// Example: "Max Mustermann"
///
public required string FullName { get; init; }
///
/// Job title or position of the signer.
///
/// Required: No (optional field)
///
/// Display: Normal weight text between name and place/date
///
/// Example: "Geschäftsführer" or empty string
///
public string Position { get; init; } = string.Empty;
///
/// Location/place where the signature was created.
///
/// Required: Yes (validated in popup)
///
/// Display: Shown with current date in German format (dd.MM.yyyy)
///
/// Example: "Berlin" ? rendered as "Berlin, 26.01.2025"
///
public required string Place { get; init; }
}