<script>
    export let form = {}
    export let operador = {}
    export let escritura = false
</script>


<div class={"form" + (escritura ? '' : ' disabled')}>
    <div class="row mb-3">
        <div class="col-md-3">ID</div>
        <div class="col-md">
            {#if operador.id_operador}
                <input type="text" value={form.id_operador} disabled class="form-control">
            {:else}
                <input type="text" bind:value={form.id_operador} required class="form-control">
            {/if}
        </div>
    </div>
    <div class="row mb-3">
        <div class="col-md-3">Nombre</div>
        <div class="col-md">
            <input type="text" bind:value={form.nombre_operador} required class="form-control">
        </div>
    </div>
     
    <div class="mb-3">
        <div class="form-check form-switch">
            <input class="form-check-input" type="checkbox" bind:checked={form.vigente} role="switch" id="vigente">
            <label class="form-check-label" for="vigente">Vigente</label>
        </div>
    </div>
</div>