@model IReadOnlyList<JobsMedical.Web.Models.ContactMethod>
@* Renders one row per contact channel (phone/Bale/Telegram/email/…) with a clickable action.
   Shared by the shift, job, and applicant detail pages. *@
@foreach (var c in Model.OrderBy(c => c.SortOrder))
{
    var href = JobsMedical.Web.Services.ContactInfo.Href(c.Type, c.Value);
    var label = JobsMedical.Web.Services.ContactInfo.Label(c.Type);
    var icon = JobsMedical.Web.Services.ContactInfo.Icon(c.Type);
    var cls = c.Type is JobsMedical.Web.Models.ContactType.Mobile or JobsMedical.Web.Models.ContactType.Phone ? "btn-accent" : "btn-outline";
    <div class="contact-row">
        <span class="c-meta"><span class="c-type">@icon @label</span><span class="c-val" dir="ltr">@c.Value</span></span>
        @if (href is not null)
        {
            <a class="btn @cls" href="@href" target="_blank" rel="noopener">@(c.Type is JobsMedical.Web.Models.ContactType.Mobile or JobsMedical.Web.Models.ContactType.Phone ? "تماس" : "باز کردن")</a>
        }
    </div>
}
