<div class="popup-box themed-popup" role="dialog" [attr.aria-modal]="true" [attr.aria-labelledby]="titleId">
    <div class="popup-header">
        <h2 class="popup-title" [id]="titleId">{{ config.title }}</h2>
        <button class="close-btn" (click)="close()" aria-label="Close">
            <i class="fa-solid fa-xmark"></i>
        </button>
    </div>

    <div class="popup-content">
        <app-dynamic-form class="popup-form" [config]="config" [initialData]="data" (formBuilt)="onFormBuilt($event)">
        </app-dynamic-form>
    </div>

    <div class="popup-actions">
        <button class="submit-btn primary" (click)="submit()">{{ config.submitLabel }}</button>
        <button class="submit-btn" (click)="close()">Cancel</button>
    </div>
</div>