/**
 * Utility to strip CollabFormFieldBaseProps keys from a props object,
 * leaving only DOM-safe rest props for spreading onto native elements.
 *
 * This replaces the massive destructuring block in each form component
 * where every base prop is assigned to an unused `_` variable just to
 * get the `...rest` for the underlying input element.
 */
/** All known prop keys from CollabFormFieldBaseProps and common form component props */
const BASE_PROP_KEYS = new Set([
    // CollabFormFieldBaseProps
    'label', 'tooltip', 'error', 'field_id', 'field_data_id', 'field_name',
    'on_chat_click', 'has_chat_messages', 'chat_status', 'is_chat_active',
    'chat_background_color', 'is_data_ok_default', 'data_ok_checked',
    'on_data_ok_change', 'data_ok_mode', 'data_ok_value', 'on_data_ok_value_change',
    'container_class_name', 'row_background_color', 'label_class_name', 'label_actions',
    'field_wrapper_class_name', 'error_class_name', 'field_width_class_name',
    'required', 'multi_state_radio',
    // hazo_chat props
    'hazo_chat_group_id', 'hazo_chat_reference_id', 'hazo_chat_reference_type',
    'hazo_chat_api_base_url', 'hazo_chat_timezone', 'hazo_chat_title',
    'hazo_chat_subtitle', 'hazo_chat_realtime_mode', 'hazo_chat_polling_interval',
    'hazo_chat_messages_per_page', 'hazo_chat_class_name', 'hazo_chat_on_close',
    'hazo_chat_is_open', 'hazo_chat_on_open_change', 'hazo_chat_show_sidebar_toggle',
    'hazo_chat_show_delete_button', 'hazo_chat_bubble_radius', 'hazo_chat_read_only',
    'hazo_chat_hide_references', 'hazo_chat_hide_sidebar', 'hazo_chat_hide_preview',
    'hazo_chat_display_mode', 'hazo_chat_container_element', 'hazo_chat_log_polling',
    // data_ok props
    'disable_data_ok', 'disable_chat', 'data_ok_editable', 'data_ok_default',
    'data_ok_hidden_states',
    // file props
    'accept_files_public', 'accept_files_private', 'accept_public_files', 'accept_private_files',
    'files_dir', 'max_size', 'min_files', 'max_files',
    'file_accept', 'file_processor', 'files', 'on_files_change', 'file_validator',
    'field_validator',
    'private_files_permission', 'can_access_private_files',
    'private_files', 'on_private_files_change',
    // notes props
    'enable_notes', 'disable_notes', 'notes', 'on_notes_change',
    'has_notes', 'is_notes_active', 'notes_panel_style', 'notes_background_color',
    'notes_save_mode', 'current_user',
    // reference tag props
    'reference_data', 'reference_value', 'reference_label', 'reference_tag_background_color',
    'on_reference_delete',
    // visibility props
    'enable_visibility_toggle', 'disable_visibility_toggle', 'visibility',
    'on_visibility_change', 'user_role',
    // additional entry props
    'additional_entry', 'max_additional_entries', 'entry_index', 'entry_count',
    'on_add_entry', 'on_delete_entry', 'is_additional_entry',
    // delete props
    'enable_delete', 'disable_delete', 'on_delete',
    // lock props
    'enable_lock', 'disable_lock', 'locked', 'on_lock_change',
    // skip props
    'enable_skip', 'disable_skip', 'skipped', 'on_skip_change',
    // display props
    'edit_actions_display', 'action_buttons_borderless',
    // dropdown consolidation
    'include_chat_in_dropdown', 'include_notes_in_dropdown',
    'extract_active_chat', 'extract_active_notes',
    // icons_behaviour
    'icons_behaviour', 'active_role',
    // clarification props
    'on_clarification_click', 'clarification_count', 'has_clarification',
    'clarification_items', 'clarification_callbacks',
    // file manager / validation props
    'file_manager', 'validating_file_ids', 'error_file_ids', 'passed_file_ids',
    'error_file_details', 'private_files_class_name',
    // common component-specific props that should be stripped
    'additional_context',
    // these are handled by the component itself, not the DOM
    'input_wrapper_class_name', 'textarea_wrapper_class_name',
    'checkbox_wrapper_class_name', 'checkbox_label_class_name', 'checkbox_label',
    'radio_wrapper_class_name', 'radio_option_wrapper_class_name', 'layout',
    'combo_wrapper_class_name', 'button_class_name', 'enable_search',
    'search_placeholder', 'empty_message', 'placeholder', 'options',
    'date_wrapper_class_name', 'date_mode', 'min_date', 'max_date',
    'disabled_dates', 'caption_layout', 'start_month', 'end_month', 'date_format',
    'dropzone_class_name', 'dropzone_wrapper_class_name', 'upload_endpoint',
    // file_textbox props
    'tag_options', 'tags_editable', 'min_height',
]);
/**
 * Strip all known base/internal props from the props object,
 * returning only DOM-safe attributes for spreading onto native elements.
 *
 * Also strips hazo_chat_* and hazo_notes_* prefixed props as a safety net.
 */
export function strip_base_props(props) {
    const result = {};
    for (const key of Object.keys(props)) {
        if (BASE_PROP_KEYS.has(key))
            continue;
        if (key.startsWith('hazo_chat_') || key.startsWith('hazo_notes_'))
            continue;
        result[key] = props[key];
    }
    return result;
}
//# sourceMappingURL=strip_base_props.js.map