import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class GymLinkAppBar extends StatelessWidget implements PreferredSizeWidget {
  const GymLinkAppBar({super.key});

  @override
  Widget build(BuildContext context) {
    return AppBar(
      backgroundColor: Theme.of(context).scaffoldBackgroundColor,
      shadowColor: null,
      automaticallyImplyLeading: false,
      elevation: 0,
      scrolledUnderElevation: 0,
      title: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Padding(
            padding: const EdgeInsets.only(right: 8),
            child: SvgPicture.asset(
              'assets/icon.svg',
              width: 24,
              height: 24,
              semanticsLabel: 'GymLink Logo',
            ),
          ),
          Align(
            alignment: Alignment.centerRight,
            child: Text(
              'Powered by GymLink',
              style: Theme.of(context).textTheme.titleSmall,
            ),
          ),
        ],
      ),
      toolbarHeight: 30,
    );
  }

  @override
  Size get preferredSize => const Size.fromHeight(30);
}
