// ignore_for_file: deprecated_member_use_from_same_package

import 'package:flutter/material.dart';
import 'package:hoshan/core/gen/assets.gen.dart';
import 'package:hoshan/ui/theme/text.dart';
import 'package:hoshan/ui/widgets/sections/loading/default_placeholder.dart';

class BotGridCardPlaceholder extends StatelessWidget {
  final int index;
  const BotGridCardPlaceholder({super.key, this.index = 0});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          boxShadow: const [
            BoxShadow(
              color: Color(0x664D4D4D),
              blurRadius: 6,
              offset: Offset(0, 1),
              spreadRadius: 0,
            )
          ],
          color: Theme.of(context).colorScheme.surface,
          borderRadius: BorderRadius.circular(16)),
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Column(
          children: [
            const SizedBox(
              height: 8,
            ),
            Center(
                child: DefaultPlaceHolder(
                    child: Container(
              width: 58,
              height: 58,
              decoration: const BoxDecoration(
                  shape: BoxShape.circle, color: Colors.white),
            ))),
            Expanded(
                child: Padding(
              padding: const EdgeInsets.symmetric(vertical: 8),
              child: Column(
                children: [
                  DefaultPlaceHolder(
                    child: Container(
                      decoration: BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.circular(16)),
                      child: Text(
                        'name of bot',
                        maxLines: 1,
                        overflow: TextOverflow.ellipsis,
                        style: AppTextStyles.body3
                            .copyWith(fontWeight: FontWeight.bold),
                      ),
                    ),
                  ),
                  const SizedBox(
                    height: 8,
                  ),
                  DefaultPlaceHolder(
                    child: Container(
                      decoration: BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.circular(16)),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Assets.icon.outline.clock.svg(width: 16, height: 16),
                          const SizedBox(
                            width: 4,
                          ),
                          Expanded(
                            child: Text(
                              '35 پیام در هر ساعت',
                              style: AppTextStyles.body5,
                              maxLines: 1,
                              overflow: TextOverflow.ellipsis,
                            ),
                          )
                        ],
                      ),
                    ),
                  ),
                ],
              ),
            )),
          ],
        ),
      ),
    );
  }
}
