export type CommentInputType = "text" | "email";

export interface FormHeading {
  id: number;
  title: string;
  note: string;
}

export interface CommentTextareaField {
  id: number;
  fieldId: string;
  name: string;
  rows: number;
  placeholder: string;
  wrapperClass: string;
}

export interface CommentInputField {
  id: number;
  type: CommentInputType;
  fieldId: string;
  name: string;
  placeholder: string;
  required: boolean;
  wrapperClass: string;
}

export interface RememberOption {
  id: number;
  fieldId: string;
  name: string;
  value: string;
  label: string;
}

export interface SubmitButtonData {
  id: number;
  label: string;
  icon: string;
  iconAlt: string;
}

export interface CommentFormData {
  headings: FormHeading[];
  textareaFields: CommentTextareaField[];
  inputFields: CommentInputField[];
  rememberOptions: RememberOption[];
  submitButtons: SubmitButtonData[];
}

export const commentFormData: CommentFormData = {
  headings: [
    {
      id: 1,
      title: "Leave a comment",
      note: "Your email address will not be published.Required fields are marked*",
    },
  ],
  textareaFields: [
    {
      id: 1,
      fieldId: "message",
      name: "message",
      rows: 4,
      placeholder: "Write Comment*",
      wrapperClass: "col-lg-12",
    },
  ],
  inputFields: [
    {
      id: 1,
      type: "text",
      fieldId: "name",
      name: "name",
      placeholder: "Your Name*",
      required: true,
      wrapperClass: "col-lg-6",
    },
    {
      id: 2,
      type: "email",
      fieldId: "email",
      name: "email",
      placeholder: "Your Email*",
      required: true,
      wrapperClass: "col-lg-6",
    },
  ],
  rememberOptions: [
    {
      id: 1,
      fieldId: "remember-comment",
      name: "remember-comment",
      value: "remember",
      label:
        "Save my name, email, and website in this browser for the next time I comment.",
    },
  ],
  submitButtons: [
    {
      id: 1,
      label: "Post Comment",
      icon: "/assets/images/icon/arrow.svg",
      iconAlt: "Arrow icon for post comment button",
    },
  ],
};
