import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sk_base_mobile/constants/bg_color.dart';
import 'package:sk_base_mobile/screens/new_inventory_inout/components/text_input.dart';
import 'package:sk_base_mobile/screens/new_inventory_inout/new_inventory_inout_controller.dart';

class CategoryInput extends StatelessWidget {
  CategoryInput({super.key});

  final controller = Get.put(NewInventoryInoutController());

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(horizontal: 20),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const SizedBox(
            height: defaultPadding / 2,
          ),
          const Padding(
            padding: EdgeInsets.symmetric(vertical: 10),
            child: Text(
              'Category',
              style:
                  TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
            ),
          ),
          Obx(
            () => TextInputField(
              controller: controller.category.value,
              hint: 'Select Category',
              focus: controller.categoryFocus.value,
              onTap: () => controller.setCategoryFocus(),
            ),
          )
        ],
      ),
    );
  }
}
