import Chat from '../components/chat.js'
import InternalMessages from "../components/internalMessagesSection.js"
import ModalDirectMessageClient from '../components/modals/modalDirectMessageClient.js'
$(function () {
    let chat = new Chat($("#chat-presupuesto"))
    chat.init()
    chat.initPresupuesto()
    if ($("#modalNewDirectMessageClient").length > 0) {

        let modalDirectMessageClient = new ModalDirectMessageClient("presupuesto", $("#modalNewDirectMessageClient"))
        modalDirectMessageClient.init()
        $("#direct-message-cliente").on("click", () => {
            modalDirectMessageClient.modal.show()
        })
    }
    if ($("#internal_messages_chat").length > 0) {
        let internalMessages = new InternalMessages($("#internal_messages_chat"))
        internalMessages.init()


    }

})