<?php
if ( ! defined('ABSPATH') ) exit;

/** Register WooCommerce Product "Translations" tab */
add_filter('woocommerce_product_data_tabs', function (array $tabs) {
    $tabs['reeid_translations'] = [
        'label'    => __('Translations', 'reeid-translate'),
        'target'   => 'reeid_translations_panel',
        'class'    => ['show_if_simple','show_if_variable','show_if_external','show_if_grouped'],
        'priority' => 81,
    ];
    return $tabs;
}, 10);

/** Render empty panel shell (content already handled elsewhere) */
add_action('woocommerce_product_data_panels', function () {
    global $post;
    if ( ! $post || $post->post_type !== 'product' ) return;
    echo '<div id="reeid_translations_panel" class="panel woocommerce_options_panel"></div>';
});
