import React from "react";
import TopHeader from "@/app/components/topHeader/TopHeader";
import globalStyle from "../../globalStyle.module.css";
import editRoleStyle from "./styles.module.css";
import TextField from "@/app/components/fields/textfield";
import Permissions from "@/app/components/permissions/Permissions";

const ViewRolePage = () => {
  const sampleData = [
    { permission: "organization.delete" },
    { permission: "user.create" },
    { permission: "user.list" },
    { permission: "user.update" },
    { permission: "robot.create" },
    { permission: "user.delete" },
    { permission: "robot.list" },
    { permission: "robot.delete" },
    { permission: "project.delete" },
    { permission: "project.update" },
    { permission: "service.create" },
    { permission: "service.list" },
    { permission: "service.delete" },
    { permission: "service.update" },
  ];
  return (
    <div className={globalStyle.section}>
      <div className={globalStyle.mainContainer}>
        <div className={globalStyle.container}>
          <TopHeader
            buttonText=""
            topbarTitle="View"
            state="view"
            requiredButtons={["back", "title", "edit", "download"]}
          />
          <div className={editRoleStyle.addRoleContainer}>
            {/* Input fields Container  */}
            <div className={editRoleStyle.inputFieldContainer}>
              {/* User Details */}
              <div className={editRoleStyle.userDetails}>
                {/* Header */}
                <div className={editRoleStyle.header}>
                  <div>
                    <p>Role Details</p>
                  </div>
                </div>
                {/* Input fields */}
                <form className={editRoleStyle.fields}>
                  {/* Email */}
                  <div className={editRoleStyle.inputMainContainer}>
                    <div className={editRoleStyle.inputContainer}>
                      {/* Label */}
                      <div className={editRoleStyle.label}>
                        <p>Name</p>
                      </div>
                      {/* Input field */}
                      <div className={editRoleStyle.inputField}>
                        {/* Static */}
                        <TextField placeHolder="organization-owner" />
                      </div>
                    </div>
                  </div>
                  {/* Full Name */}
                  <div className={editRoleStyle.inputMainContainer}>
                    <div className={editRoleStyle.inputContainer}>
                      {/* Label */}
                      <div className={editRoleStyle.label}>
                        <p>Organization ID</p>
                      </div>
                      {/* Input field */}
                      <div className={editRoleStyle.inputField}>
                        {/* Static */}
                        <TextField placeHolder="67160a5ae69144ff19aafb86" />
                      </div>
                    </div>
                  </div>
                </form>
              </div>

              {/* Permissions */}
              <Permissions sampleData={sampleData} />
            </div>
          </div>
        </div>
      </div>
    </div>
  );
};

export default ViewRolePage;
