import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
import 'package:syncrow_app/generated/assets.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';

class SmartLinkgeView extends StatelessWidget {
  const SmartLinkgeView({super.key});

  @override
  Widget build(BuildContext context) {
    return DefaultScaffold(
      title: 'Scene',
      child: Column(
        children: [
          DefaultContainer(
            padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 20),
            child: Row(
              children: [
                SizedBox(
                  width: 45,
                  height: 40,
                  child: SvgPicture.asset(
                      Assets.assetsIconsLinkageIconsFamilyHome),
                ),
                const SizedBox(width: 15),
                const Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      BodyLarge(
                        text: 'Family go home',
                        fontWeight: FontWeight.bold,
                      ),
                      BodySmall(
                        text: 'Trigger linkage when family member go home.',
                      )
                    ],
                  ),
                ),
                const SizedBox(width: 10),
                Transform.scale(
                  scale: 1,
                  child: CupertinoSwitch(
                    value: false,
                    onChanged: (value) {},
                    applyTheme: true,
                  ),
                ),
              ],
            ),
          ),
          const SizedBox(height: 10),
          DefaultContainer(
            padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 20),
            child: Row(
              children: [
                SizedBox(
                  width: 45,
                  height: 40,
                  child: SvgPicture.asset(
                      Assets.assetsIconsLinkageIconsDoorLockAlarm),
                ),
                const SizedBox(width: 15),
                const Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      BodyLarge(
                        text: 'Door Lock Alarm',
                        fontWeight: FontWeight.bold,
                      ),
                      BodySmall(
                        text: 'When door lock alarms, trigger linkage.',
                      )
                    ],
                  ),
                ),
                const SizedBox(width: 10),
                Transform.scale(
                  scale: 1,
                  child: CupertinoSwitch(
                    value: false,
                    onChanged: (value) {},
                    applyTheme: true,
                  ),
                ),
              ],
            ),
          ),
          const Spacer(),
          DefaultContainer(
            onTap: () {},
            padding: const EdgeInsets.symmetric(horizontal: 50, vertical: 10),
            color: ColorsManager.primaryColorWithOpacity,
            child: const BodyMedium(
              text: 'Custom linkage Type',
              fontColor: Colors.white,
            ),
          ),
        ],
      ),
    );
  }
}
