import 'package:url_launcher/url_launcher.dart';
import '../../features/workspaces/domain/project_workspace.dart';

class WorkspaceLauncher {
  Future<bool> openCodeServer(ProjectWorkspace project) async {
    final uri = Uri.parse(project.codeServerUrl);
    if (await canLaunchUrl(uri)) {
      return launchUrl(uri, mode: LaunchMode.externalApplication);
    }
    return false;
  }
}
