import { __ } from "@wordpress/i18n";
import PostTypeVisibilityChecklist from "./PostTypeVisibilityChecklist";

/**
 * Checkbox list for toggling post type configuration tabs.
 */
export default function SimpleModePanel({
  postTypeCatalog,
  configuredPostTypes,
  onTogglePostType,
  includeNonPublicPostTypes = false,
  onIncludeNonPublicPostTypesChange,
}) {
  return (
    <PostTypeVisibilityChecklist
      postTypeCatalog={postTypeCatalog}
      selectedPostTypes={configuredPostTypes}
      onTogglePostType={onTogglePostType}
      includeNonPublicPostTypes={includeNonPublicPostTypes}
      onIncludeNonPublicPostTypesChange={onIncludeNonPublicPostTypesChange}
      helperText={__(
        "Public post types are shown by default. Selected non-public post types remain visible.",
        "cache-autopilot",
      )}
      emptyMessage={__("No post types found.", "cache-autopilot")}
      classNamePrefix="ekesto-simple-panel"
    />
  );
}
