import 'package:flutter/material.dart';
import 'package:sk_base_mobile/constants/bg_color.dart';
import 'package:sk_base_mobile/util/screen_adaper_util.dart';

class PeriorityContainer extends StatelessWidget {
  final String text;
  final bool selected;

  const PeriorityContainer(
      {super.key, required this.text, required this.selected});

  @override
  Widget build(BuildContext context) {
    return AnimatedContainer(
      duration: const Duration(milliseconds: 300),
      padding: EdgeInsets.all(selected ? 3 : 0),
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(30),
          color: selected ? Colors.orange : Colors.black12),
      child: Container(
        padding: EdgeInsets.symmetric(
            horizontal: ScreenAdaper.width(20),
            vertical: ScreenAdaper.height(10)),
        decoration: BoxDecoration(
          color: selected ? Colors.white : Colors.transparent,
          borderRadius: BorderRadius.circular(30),
        ),
        child: Text(
          text,
          style: const TextStyle(
              color: darkAccentBlue, fontWeight: FontWeight.bold),
        ),
      ),
    );
  }
}
