"use client";
import RemoteDataTable from "@/components/RemoteDataTable";

export default function UserAccessList({ userId }: { userId: string }) {
  return (
    <div className="">
      <RemoteDataTable
        table="user_access"
        idField="access_id"
        columns={[
          { name: "access_type", label: "Type" },
          { name: "access_value", label: "Value" },
          { name: "is_active", label: "Active" },
        ]}
        where={{
          user_id: userId,
        }}
        addSectionLabel="Add Access"
        addSectionUrl={`/d/user/${userId}/access/new`}
        urlData={`/d/user/${userId}/access/:access_id`}
      />
    </div>
  );
}
