<div class="job-frame">
    @if (jobsCompany != null){
        <div class="company-details">
            <div class="center-item">
                <a [href]="jobsCompany.websiteURL">
                    <img [src]="jobsCompany.logo" />
                </a>
            </div>
            <div class="center-item">
                <div class="content-link"><a [href]="'mailto:' + jobsCompany.email" >{{ jobsCompany.email }}</a></div>
                <div class="content-name"><h1>{{ jobsCompany.name }}</h1></div>
                <div class="content-link"><a [href]="'tel:' + jobsCompany.phone">{{ jobsCompany.phone }}</a></div>
            </div>
            <div class="center-item">
                <h1>{{ jobsCompany.city }}, {{ jobsCompany.stateOrRegion }} {{ jobsCompany.postalCode }}</h1>
            </div>
            <div class="content-desc">
                @for(line of jobsCompany.description.split('\n'); track line.length){
                    <h1>{{ line }}</h1>
                }
            </div>
        </div>
    }
    @if (selectedJob != null) {
        <div class="job-details">
            <div class="job-timestamp">
                <h1>Opened: {{ selectedJob.createdTime }}</h1>
                <h1>Modified: {{ selectedJob.modifiedTime }}</h1>
            </div>

            @if (selectedJob.isDeleted){
                <div class="job-warning">
                    <h2>THIS JOB POSTING IS CLOSED</h2>
                </div>
            }

            <h1>{{ selectedJob.title }}</h1>

            <h1>{{ selectedJob.jobType }}</h1>
            <h1>{{ selectedJob.remote }}</h1>

            <h1>{{ selectedJob.salaryMin }}</h1>
            <h1>{{ selectedJob.salaryMax }}</h1>
            
            <h1>{{ selectedJob.city }}</h1>
            <h1>{{ selectedJob.stateOrRegion }}</h1>
            <h1>{{ selectedJob.country }}</h1>
            <h1>{{ selectedJob.postalCode }}</h1>

            <h1>{{ selectedJob.description }}</h1>
        </div>
    }
</div>