document.addEventListener('DOMContentLoaded', function() {
  const taskDetailElement = document.getElementById('task-detail-app');
  if (taskDetailElement) {
    initTaskDetailApp();
  }
});

function initTaskDetailApp() {
  const { createApp } = Vue;
  
  const app = createApp({
    template: '<TaskDetail :task-id="taskId" />',
    components: {
      TaskDetail: TaskDetailComponent
    },
    setup() {
      const taskId = window.taskId;
      return { taskId };
    }
  });

  app.mount('#task-detail-app');
}
