import 'package:flutter/material.dart';
import 'package:satu/core/services/navigator_service.dart';
import 'package:satu/core/utils/locator.dart';
import 'package:satu/routes/route_names.dart';
import 'package:satu/widgets/bar/products_app_bar.dart';
import 'package:satu/widgets/bar/products_title_bar.dart';

import 'component/setting_item.dart';

class SettingsView extends StatelessWidget {
  final NavigatorService _navigatorService = locator<NavigatorService>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const ProductsAppBar(
        title: 'Настройки',
        drawerShow: true,
      ),
      body: SingleChildScrollView(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            const ProductsTitleBarBar(title: 'Разделы'),
            SettingItem(
              title: 'Принтер',
              subTitle: 'Настройка печати чеков',
              onPress: () {
                _navigatorService.push(settingPrinterBluetoothViewRoute);
              },
            ),
          ],
        ),
      ),
    );
  }
}
