import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pweb/controllers/settings/profile_actions.dart';
import 'package:pweb/models/settings/profile_action_section.dart';
import 'package:pweb/pages/settings/profile/actions/button.dart';


class ProfileLanguageActionButton extends StatelessWidget {
  const ProfileLanguageActionButton({super.key, required this.label});

  final String label;

  @override
  Widget build(BuildContext context) {
    final controller = context.watch<ProfileActionsController>();

    return ProfileActionButton(
      icon: Icons.language_outlined,
      label: label,
      isSelected: controller.isExpanded(ProfileActionSection.language),
      onPressed: () => controller.toggle(ProfileActionSection.language),
    );
  }
}
