<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Config;

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Infrastructure\Config\Abstraction\AbstractSingleConfig;
class PluginConfig extends AbstractSingleConfig
{
    public const ID = 'plugin';
    private $plugin_name;
    private $text_domain;
    private $version;
    private $plugin_file;
    private $plugin_dir;
    private $marketing_slug;
    public function __construct($plugin_name, $text_domain, $version, $plugin_file, $plugin_dir, $marketing_slug = 'woocommerce-dropshipping-export')
    {
        $this->plugin_name = $plugin_name;
        $this->text_domain = $text_domain;
        $this->version = $version;
        $this->plugin_file = $plugin_file;
        $this->plugin_dir = trailingslashit($plugin_dir);
        $this->marketing_slug = $marketing_slug;
    }
    public function get(): array
    {
        $dir_url = plugin_dir_url($this->plugin_file);
        $core_dir = $this->plugin_dir . 'vendor_prefixed/wpdesk/dropshipping-export/';
        $core_dir_url = $dir_url . \str_replace($this->plugin_dir, '', $core_dir);
        return ['name' => $this->plugin_name, 'version' => $this->version, 'text_domain' => $this->text_domain, 'file' => $this->plugin_file, 'dir' => $this->plugin_dir, 'dir_url' => $dir_url, 'core_dir' => $core_dir, 'core_dir_url' => $core_dir_url, 'persistance_prefix' => 'dropshipping_export', 'development' => \true, 'marketing_slug' => $this->marketing_slug];
    }
    public function get_id(): string
    {
        return self::ID;
    }
}
