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

import 'package:get/get.dart';
import 'package:taafee_mobile/common/const/const.dart';
import 'package:taafee_mobile/features/category/data_layer/model/category.dart';

import '../../../../common/widgets/text.dart';

class SearchCategoryWidget extends StatelessWidget {
  final CategoryModel categoryModel;
  const SearchCategoryWidget({super.key, required this.categoryModel});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.symmetric(horizontal: 25),
      width: Get.width,
      height: 50,
      child: Column(
        children: [
          Row(
            children: [
              SizedBox(
                width: 25,
                height: 25,
                child: CachedNetworkImage(
                    imageUrl: Domain.domain + categoryModel.icon.substring(6)),
              ),
              RegularTextWidget(
                " ${categoryModel.name}",
                fontSize: 14,
              )
            ],
          ),
          const Divider(),
        ],
      ),
    );
  }
}
