File size: 1,046 Bytes
eeb9404
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use client';

import React from 'react';
import {
  Dialog,
  DialogContent,
  DialogHeader,
  DialogTitle,
} from '@/components/ui/dialog';
import { InterviewTemplatesPanel } from './InterviewTemplatesPanel';

interface InterviewTemplatesManagerProps {
  open: boolean;
  onOpenChange: (open: boolean) => void;
  initialMode?: 'list' | 'create';
  onChanged?: () => void;
}

export function InterviewTemplatesManager({
  open,
  onOpenChange,
  initialMode = 'list',
  onChanged,
}: InterviewTemplatesManagerProps) {
  return (
    <Dialog open={open} onOpenChange={onOpenChange}>
      <DialogContent className="max-w-[90vw] sm:max-w-[85vw] lg:max-w-[70vw] xl:max-w-[900px] h-[85vh] p-0 overflow-hidden">
        {/* sr-only title so Radix has an accessible name in every mode */}
        <DialogHeader className="sr-only">
          <DialogTitle>Interview templates</DialogTitle>
        </DialogHeader>
        {open && <InterviewTemplatesPanel initialMode={initialMode} onChanged={onChanged} />}
      </DialogContent>
    </Dialog>
  );
}