import { defineComponent, createBlock, openBlock } from "vue";
import PreviewView from "./PreviewView.vue.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  emits: ["logout", "create-room", "join-room", "camera-preference-change", "microphone-preference-change"],
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const handleCreateRoom = (roomId, roomType) => {
      emit("create-room", roomId, roomType);
    };
    const handleJoinRoom = (roomId, roomType) => {
      emit("join-room", roomId, roomType);
    };
    const handleCameraPreferenceChange = (isOpen) => {
      emit("camera-preference-change", isOpen);
    };
    const handleMicrophonePreferenceChange = (isOpen) => {
      emit("microphone-preference-change", isOpen);
    };
    const handleLogout = () => {
      emit("logout");
    };
    return (_ctx, _cache) => {
      return openBlock(), createBlock(PreviewView, {
        onLogout: handleLogout,
        onCreateRoom: handleCreateRoom,
        onJoinRoom: handleJoinRoom,
        onCameraPreferenceChange: handleCameraPreferenceChange,
        onMicrophonePreferenceChange: handleMicrophonePreferenceChange
      });
    };
  }
});
export {
  _sfc_main as default
};
