<modal-dialvox v-model="targets.edit" send="Guardar" small @submit="add('editarTelefonoDID', 'edit')" :disabled="!validForm">
    <h4>{{traducirFrase("Editar telefono")}}</h4>
    <br><br>
    <div class="container">
        <div class="row">
            <div class="input-field">
                <input type="text" id="edit_descripcion" v-model="one.descripcion" v-bind:placeholder="traducirFrase('Alias')">
                <label for="edit_descripcion">{{traducirFrase("Alias")}}</label>
            </div>
            <div class="row">
                <label for="edit_grabar">
                    <input type="checkbox" v-model="one.grabar" id="edit_grabar">
                    <span>{{traducirFrase("Grabar")}}</span>
                </label>
            </div>
            <div class="row">
                <label for="edit_activo">
                    <input type="checkbox" v-model="one.activo" id="edit_activo">
                    <span>{{traducirFrase("Activo")}}</span>
                </label>
            </div>
            <div class="input-field">
                <label for="edit_ruta" class="active">
                    {{traducirFrase("Ruta")}}
                </label>
                <select id="edit_ruta" class="browser-default" v-model="one.ruta" placeholder="Ruta">
                    <option :value="''" selected>
                        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="edit_extension" class="active">
                    {{traducirFrase("Extension")}}
                </label>
                <select id="edit_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="edit_vextension" v-model="one.valorExtension" v-bind:placeholder="traducirFrase('Extension')">
                <label for="edit_vextension">{{traducirFrase("Extension")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'EXTEN' && one.extension === ''">
                <label for="edit_carrier" class="active">
                    {{traducirFrase("Carrier")}}
                </label>
                <select id="edit_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="edit_extension_contexto" class="active">
                    {{traducirFrase("Contexto")}}
                </label>
                <select id="edit_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="edit_agente" class="active">
                    {{traducirFrase("Agente")}}
                </label>
                <select id="edit_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="edit_voicemail" v-model="one.voicemail" placeholder="Buzon de voz">
                <label for="edit_voicemail">{{traducirFrase("Buzon de voz")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'PHONE'">
                <input type="text" id="edit_telefono" v-model="one.telefono" placeholder="Telefono">
                <label for="edit_telefono">{{traducirFrase("Telefono")}}</label>
            </div>
            <div class="input-field" v-if="one.ruta === 'IN_GROUP'">
                <label for="edit_grupoEntrada" class="active">
                    {{traducirFrase("Grupo de Entrada")}}
                </label>
                <select id="edit_grupoEntrada" class="browser-default" v-model="one.grupoEntrada" placeholder="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="edit_handle_method" class="active">
                    {{traducirFrase("Metodo de manejo de llamadas")}}
                </label>
                <select id="edit_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="edit_search_method" class="active">
                    {{traducirFrase("Metodo de busqueda de agente")}}
                </label>
                <select id="edit_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="edit_campana" class="active">
                    {{traducirFrase("Campaña")}}
                </label>
                <select id="edit_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="edit_lista" class="active">
                    {{traducirFrase("Lista")}}
                </label>
                <select id="edit_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="edit_callmenu" class="active">
                    {{traducirFrase("Menu")}}
                </label>
                <select id="edit_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


-->
