import 'package:flutter/material.dart' hide Action;
import 'package:sendtrain/database/database.dart';
import 'package:sendtrain/widgets/generic/elements/form_text_input.dart';

class ActivityActionEditor extends StatelessWidget {
  ActivityActionEditor({super.key, required this.action, this.callback});

  final Action action;
  final Function? callback;
  final GlobalKey<FormState> _formKey = GlobalKey<FormState>();

  final Map<String, TextEditingController> actionEditController = {
    'sets': TextEditingController(),
    'reps': TextEditingController(),
    'weight': TextEditingController(),
  };

  @override
  Widget build(BuildContext context) {
    String editorType = 'Create';

    return Padding(
        padding: EdgeInsets.fromLTRB(15, 0, 15, 15),
        child: Form(
            key: _formKey,
            child: Column(
              mainAxisSize: MainAxisSize.min,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                Padding(
                    padding: EdgeInsets.only(top: 10, bottom: 10),
                    child: Text('$editorType Action',
                        textAlign: TextAlign.center,
                        style: Theme.of(context).textTheme.titleLarge)),
                FormTextInput(
                    controller: actionEditController['sets']!,
                    title: 'Total Sets'),])));
  }
}