<script>
    import {getContext} from "svelte";
    import {previewTitle} from "./../Preview";

    const channel = getContext("channel");
    export let schema;
    export let record;
    export let isCreateMode;

</script>

<div class="record-header">

    <a
            class="schema-name"
            href="{channel.lucentUrl}/content/{schema.name}"
    >{schema.label.toUpperCase()}</a
    >
    <span class="record-title">
        {#if !isCreateMode}
            {previewTitle(channel.schemas, record)}
        {:else}
            New Record
        {/if}
    </span>

</div>