@model PlanRecord
<div class="taskCard @(Model.Progress == PlanProgress.Done ? "nodrag" : "") text-dark user-select-none mt-2 mb-2" draggable="@(Model.Progress == PlanProgress.Done ? "false" : "true")" ondragstart="dragStart(event, @Model.Id)" onclick="@(Model.Progress == PlanProgress.Done ? $"deletePlanRecord({Model.Id})" : $"showEditPlanRecordModal({Model.Id})")">
    <div class="card-body">
        <div class="row">
            <div class="col-12 col-lg-8 text-truncate">
                @if (Model.Progress == PlanProgress.Done)
                {
                    <span class="taskCard-title text-truncate"><s>@Model.Description</s></span>
                } else
                {
                    <span class="taskCard-title text-truncate">@Model.Description</span>
                }
            </div>
            <div class="col-12 col-lg-4 d-flex align-items-center">
                <span class="text-truncate">@Model.Cost.ToString("C2")</span>
            </div>
        </div>
        <div class="row">
            <div class="col-6 col-md-1">
                @if (Model.ImportMode == ImportMode.ServiceRecord)
                {
                    <i class="bi bi-card-checklist"></i>
                }
                else if (Model.ImportMode == ImportMode.UpgradeRecord)
                {
                    <i class="bi bi-wrench-adjustable"></i>
                }
                else if (Model.ImportMode == ImportMode.RepairRecord)
                {
                    <i class="bi bi-exclamation-octagon"></i>
                }
            </div>
            <div class="col-6 col-md-1">
                @if (Model.Priority == PlanPriority.Critical)
                {
                    <i class="bi bi-fire"></i>
                }
                else if (Model.Priority == PlanPriority.Normal)
                {
                    <i class="bi bi-water"></i>
                }
                else if (Model.Priority == PlanPriority.Low)
                {
                    <i class="bi bi-snow"></i>
                }
            </div>
        </div>
    </div>
</div>