<modal-dialvox v-model="targets.add" small @submit="add('crearTelefonoDID', 'add')" :disabled="!validForm">
    <h4>{{traducirFrase("Registrar telefono")}}</h4>
    <br><br>
    <div class="container">
        <div class="row">
            <div class="input-field">
                <input type="text" id="add_didExtension" v-model="one.didExtension" v-bind:placeholder="traducirFrase('Telefono DID')">
                <label for="add_didExtension">{{traducirFrase("Telefono DID")}}</label>
            </div>
            <div class="input-field">
                <input type="text" id="add_descripcion" v-model="one.descripcion" v-bind:placeholder="traducirFrase('Alias')">
                <label for="add_descripcion">{{traducirFrase("Alias")}}</label>
            </div>
            <div class="row">
                <label for="add_grabar">
                    <input type="checkbox" v-model="one.grabar" id="add_grabar">
                    <span>{{traducirFrase("Grabar")}}</span>
                </label>
            </div>
            <div class="row">
                <label for="add_activo">
                    <input type="checkbox" v-model="one.activo" id="add_activo">
                    <span>{{traducirFrase("Activo")}}</span>
                </label>
            </div>
            <div class="input-field">
                <label for="add_ruta" class="active">
                    {{traducirFrase("Ruta")}}
                </label>
                <select id="add_ruta" class="browser-default" v-model="one.ruta" placeholder="Ruta">
                    <option :value="''" selected>
                        {{traducirFrase("Sin ruta")}}
                    </option>
                    <option :value="'EXTEN'">
                        {{traducirFrase("Extension")}}
                    </option>
                    <option :value="'AGENT'">
                        {{traducirFrase("Agente")}}
                    </option>
                    <option :value="'VOICEMAIL'">
                        {{traducirFrase("Buzon de Voz")}}
                    </option>
                    <option :value="'PHONE'">
                        {{traducirFrase("Telefono")}}
                    </option>
                    <option :value="'IN_GROUP'">
                        {{traducirFrase("Grupo de entrada")}}
                    </option>
                    <option :value="'CALLMENU'">
                        {{traducirFrase("Menu")}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'EXTEN'">
                <label for="add_extension" class="active">
                    {{traducirFrase("Extension")}}
                </label>
                <select id="add_extension" class="browser-default" v-model="one.extension" placeholder="Extension">
                    <option :value="''" selected disable>
                        {{traducirFrase("Otro")}}
                    </option>
                    <option :value="elem.value" v-for="elem in extensiones" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'EXTEN' && one.extension === ''">
                <input type="text" id="add_vextension" v-model="one.valorExtension" v-bind:placeholder="traducirFrase('Extension')">
                <label for="add_vextension">{{traducirFrase("Extension")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'EXTEN' && one.extension === ''">
                <label for="add_carrier" class="active">
                    {{traducirFrase("Carrier")}}
                </label>
                <select id="add_carrier" class="browser-default" v-model="one.carrier" placeholder="Contexto">
                    <option :value="''" selected>
                        {{traducirFrase("Sin carrier")}}
                    </option>
                    <option :value="elem.value" v-for="elem in carriers" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'EXTEN'">
                <label for="add_extension_contexto" class="active">
                    {{traducirFrase("Contexto")}}
                </label>
                <select id="add_extension_contexto" class="browser-default" v-model="one.contextoExtension" placeholder="Contexto">
                    <option :value="''" selected>
                        {{traducirFrase("Sin contexto")}}
                    </option>
                    <option :value="elem.value" v-for="elem in contextos" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'AGENT'">
                <label for="add_agente" class="active">
                    Agente
                </label>
                <select id="add_agente" class="browser-default" v-model="one.agente" placeholder="Agente">
                    <option :value="''" selected disabled>
                        {{traducirFrase("Selecciona un agente")}}
                    </option>
                    <option v-for="elem in agentes" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'VOICEMAIL'">
                <input type="text" id="add_voicemail" v-model="one.voicemail" v-bind:placeholder="traducirFrase('Buzon de voz')">
                <label for="add_voicemail">{{traducirFrase("Buzon de Voz")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'PHONE'">
                <input type="text" id="add_telefono" v-model="one.telefono" v-bind:placeholder="traducirFrase('Telefono')">
                <label for="add_telefono">{{traducirFrase("Telefono")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="add_grupoEntrada" class="active">
                    {{traducirFrase("Grupo de Entrada")}}
                </label>
                <select id="add_grupoEntrada" class="browser-default" v-model="one.grupoEntrada" v-bind:placeholder="traducirFrase('Grupo de Entrada')">
                    <option :value="''" selected disabled>
                        {{traducirFrase("Selecciona un grupo de entrada")}}
                    </option>
                    <option v-for="elem in gruposEntrada" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="add_handle_method" class="active">
                    {{traducirFrase("Metodo de manejo de llamadas")}}
                </label>
                <select id="add_handle_method" class="browser-default" v-model="one.metodoManejo" placeholder="Metodo de manejo de llamadas">
                    <option v-for="elem in metodosManejo" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="add_search_method" class="active">
                    {{traducirFrase("Metodo de busqueda de agente")}}
                </label>
                <select id="add_search_method" class="browser-default" v-model="one.metodoBusqueda" placeholder="Metodo de busqueda de agente">
                    <option v-for="elem in metodosBusqueda" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="add_campana" class="active">
                    {{traducirFrase("Campaña")}}
                </label>
                <select id="add_campana" class="browser-default" v-model="one.campana" placeholder="Campaña">
                    <option :value="''" selected>
                        {{traducirFrase("Sin campaña")}}
                    </option>
                    <option v-for="elem in campanas" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="add_lista" class="active">
                    {{traducirFrase("Lista")}}
                </label>
                <select id="add_lista" class="browser-default" v-model="one.lista" placeholder="Lista">
                    <option :value="'999'" selected>
                        {{traducirFrase("Lista default")}}
                    </option>
                    <option v-for="elem in listas" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
            <div class="input-field" v-if="one.ruta === 'CALLMENU'">
                <label for="add_callmenu" class="active">
                    {{traducirFrase("Menu")}}
                </label>
                <select id="add_callmenu" class="browser-default" v-model="one.menu" placeholder="Menu">
                    <option :value="null" selected>
                        {{traducirFrase("Sin menu")}}
                    </option>
                    <option v-for="elem in menus" :value="elem.value" :key="elem.value">
                        {{elem.label}}
                    </option>
                </select>
            </div>
        </div>
    </div>
</modal-dialvox>
<!--Tabla de registros
    nombre
    activo
    orden
        random
        oldest_call_start
        oldest_call_finish
        oldest_inbound_call_start
        oldest_inbound_call_finish
        overall_user_level
        inbound_group_rank
        campaign_rank
        ingroup_grade_random
        campaign_grade_random
        fewest_calls
        fewest_calls_campaign
        longest_wait_time
        ring_all
        overall_user_level_wait_time
        campaign_rank_wait_time
        fewest_calls_campaign_wait_time
        inbound_group_rank_wait_time
        fewest_calls_wait_time

-->
