<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\PlanV1;

class InsertPlansData extends Command
{
    protected $signature = 'insert:plans {type}';

    protected $description = 'Insert plans data into the database based on the provided type';

    public function __construct()
    {
        parent::__construct();
    }

    public function handle()
    {
        $type = $this->argument('type');

        /* $plansData = [
            'hgh' => [
                [
                    'title' => 'Basic Plan',
                    'currency' => '$',
                    'price' => '195.00',
                    'list_one_title' => 'TRT prescription',
                    'list_two_title' => 'A nazial mist or a pre-filled syringe for self-injection',
                    'list_sub_title' => 'Either be cream or oral liquied',
                    'image_url' => '',
                ],
                [
                    'title' => 'Pro Plan',
                    'currency' => '$',
                    'price' => '195.00',
                    'list_one_title' => 'TRT prescription',
                    'list_two_title' => 'A nazial mist or a pre-filled syringe for self-injection',
                    'list_sub_title' => 'Either be cream or oral liquied',
                    'image_url' => '',
                ],
                [
                    'title' => 'Elite Plan',
                    'currency' => '$',
                    'price' => '995.00',
                    'list_one_title' => 'HGH & TRT prescription',
                    'list_two_title' => 'Growth hormone zinc and magnesium',
                    'list_sub_title' => 'Everything in Pro Plan',
                    'image_url' => '',
                ],
            ],
            'peptide' => [
                [
                    'title' => 'Semaglutide',
                    'currency' => '$',
                    'price' => '399.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'Semaglutide, generic Ozempic and generic wegovy, is a potent medical weight loss treatment, with users typically experiencing an average loss of 15% of their body weight.',
                    'list_sub_title' => 'Weight Loss',
                    'image_url' => 'semaglutide.png',
                ],
                [
                    'title' => 'Tirzepatide',
                    'currency' => '$',
                    'price' => '499.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'Tirzepatide, generic Zepbound and generic Mounjaro, is a powerful medical weight loss treatment, often enabling individuals to lose 20% or more of their body weight, showcasing its enhanced efficacy compared to Semaglutide.',
                    'list_sub_title' => 'Weight Loss',
                    'image_url' => 'Tirzepatide.webp',
                ],
                [
                    'title' => 'Sermorelin Injections',
                    'currency' => '$',
                    'price' => '249.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'Sermorelin injections stimulate the body\'s natural production of growth hormone, promoting muscle growth, fat loss, and overall rejuvenation.',
                    'list_sub_title' => 'Lean Muscle Mass & Fat Loss',
                    'image_url' => 'Sermorelin.webp',
                ],
                [
                    'title' => 'PT-141 Injections',
                    'currency' => '$',
                    'price' => '345.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'Sexual health and Performance. Supplies are shipped with treatment',
                    'list_sub_title' => 'Sexual Performance',
                    'image_url' => 'PT-141.webp',
                ],
                [
                    'title' => 'PT-141 Troche',
                    'currency' => '$',
                    'price' => '418.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'Sexual health and Performance. Supplies are shipped with treatment',
                    'list_sub_title' => 'Sexual Performance',
                    'image_url' => 'pt-141_troche-2.webp',
                ],
                [
                    'title' => 'VIP Nasal Spray',
                    'currency' => '$',
                    'price' => '210.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'VIP nasal spray offers targeted delivery of therapeutic peptides to support digestive health, immune function, and circadian regulation.',
                    'list_sub_title' => 'Systemic Wellness',
                    'image_url' => 'vip_nasal-spray.webp',
                ],
                [
                    'title' => 'SS-31 Injections',
                    'currency' => '$',
                    'price' => '1230.00',
                    'list_one_title' => 'RX Prescription',
                    'list_two_title' => 'VIP nasal spray offers targeted delivery of therapeutic peptides to support digestive health, immune function, and circadian regulation.',
                    'list_sub_title' => 'Longevity & Performance',
                    'image_url' => 'ss-31_syringes.webp',
                ],
            ],
            'peptide_new' => [
                [
                    'title' => 'AOD9604 [ 5mg]',
                    'currency' => '$',
                    'price' => '70.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'AOD9604 is a peptide fragment of human growth hormone (HGH) used for its potential benefits in fat metabolism, weight loss, and joint health.',
                    'list_sub_title' => 'Weight Loss',
                    'image_url' => 'AOD9604-05mg.webp',
                    'slug' => 'AOD9604-5mg',
                ],
                [
                    'title' => 'BPC – 157',
                    'currency' => '$',
                    'price' => '199.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => "BPC-157 is a penta-decapeptide composed of 15 amino acids. It is a partial sequence of the body protection compound (BPC) that was discovered in and isolated from human gastric juice. Animal studies have shown it to accelerate the healing of many different wounds, including muscle, tendon, and damaged ligaments. Additionally, BPC 157 has been shown to protect organs and aid in the prevention of gastric ulcers.",
                    'list_sub_title' => 'Body Protection Compound',
                    'image_url' => 'BPC-157-10mg.webp',
                    'slug' => 'bpc–157',
                ],
                [
                    'title' => 'CJC-1295, Ipamorelin Blend [ 10mg]',
                    'currency' => '$',
                    'price' => '95.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'CJC-1295 causes the natural release of GH by naturally stimulating the growth hormone-releasing hormone receptor',
                    'list_sub_title' => 'Growth hormone',
                    'image_url' => 'CJC-1295-Ipamorelin-Blend-10mg.webp',
                    'slug' => 'CJC-1295-10mg',
                ],
                [
                    'title' => 'PT-141 Injection',
                    'currency' => '$',
                    'price' => '149.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'PT-141, also known as Bremelanotide, is a melanocortin receptor agonist that boosts sexual desire and arousal by stimulating specific receptors in the brain. This peptide promotes increased libido and sexual function for both men and women, offering a unique solution for enhancing intimate experiences. Enjoy the convenience of our peptide subscription, delivering in-home treatments directly to your door',
                    'list_sub_title' => 'Sexual Performance',
                    'image_url' => 'PT-141-10-mg.webp',
                    'slug' => 'pt-141-Injection-10mg',
                ],
                [
                    'title' => 'Semaglutide [3mg]',
                    'currency' => '$',
                    'price' => '199.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'Our Semaglutide weight loss program, led by board-certified physicians, can help you on a transformative journey toward a healthier lifestyle. The program includes monthly personalized Semaglutide prescriptions, regular virtual check-ins, and unlimited messaging with providers. Join the thousands of people who have already achieved their weight loss goals through this program.',
                    'list_sub_title' => 'Weight Loss',
                    'image_url' => 'Semaglutide-05mg.webp',
                    'slug' => 'semaglutide-3mg',
                ],
                [
                    'title' => 'Semaglutide [5mg]',
                    'currency' => '$',
                    'price' => '220.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'Our Semaglutide weight loss program, led by board-certified physicians, can help you on a transformative journey toward a healthier lifestyle. The program includes monthly personalized Semaglutide prescriptions, regular virtual check-ins, and unlimited messaging with providers. Join the thousands of people who have already achieved their weight loss goals through this program.',
                    'list_sub_title' => 'Weight Loss',
                    'image_url' => 'Semaglutide-05mg.webp',
                    'slug' => 'semaglutide-5mg',
                ],
                [
                    'title' => 'TB-500 (Thymosin Beta-4) [ 10mg ]',
                    'currency' => '$',
                    'price' => '170.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'TB-500, also known as Thymosin Beta-4, is a peptide consisting of 43 amino acids. In animal studies, Thymosin Beta-4 has demonstrated the ability to promote blood vessel growth, regulate wound healing, decrease inflammation, and reduce oxidative damage in the heart and central nervous system. This peptide plays a significant role in protecting tissues, and facilitating tissue repair, regeneration, and remodeling of injured or damaged tissues. Additionally, it is a subject of active research in the field of anti-aging.',
                    'list_sub_title' => 'Injury Recovery',
                    'image_url' => 'TB-500-Thymosin-Beta-4-10-mg.webp',
                    'slug' => 'tb-500-10mg',
                ],
                [
                    'title' => 'Tesamorelin [5mg]',
                    'currency' => '$',
                    'price' => '75.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'Tesamorelin is a synthetic peptide consisting of 44 amino acids that mimic the growth hormone-releasing hormone (GHRH). It is specifically designed to stimulate the production and release of endogenous growth hormone (GH) from the pituitary gland. Originally developed for the treatment of lipodystrophy in HIV-positive individuals, Tesamorelin has shown potential benefits in reducing visceral adipose tissue and improving body composition. This peptide is utilized in various research and clinical settings for its ability to enhance GH levels, which may support lean muscle mass development, fat loss, and overall metabolic health., immune function, and circadian regulation.',
                    'list_sub_title' => 'Weight loss',
                    'image_url' => 'Tesamorelin-05mg.webp',
                    'slug' => 'tesamorelin-5mg',
                ],
                [
                    'title' => 'Tesamorelin [10mg]',
                    'currency' => '$',
                    'price' => '135.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'Tesamorelin is a synthetic peptide consisting of 44 amino acids that mimic the growth hormone-releasing hormone (GHRH). It is specifically designed to stimulate the production and release of endogenous growth hormone (GH) from the pituitary gland. Originally developed for the treatment of lipodystrophy in HIV-positive individuals, Tesamorelin has shown potential benefits in reducing visceral adipose tissue and improving body composition. This peptide is utilized in various research and clinical settings for its ability to enhance GH levels, which may support lean muscle mass development, fat loss, and overall metabolic health., immune function, and circadian regulation.',
                    'list_sub_title' => 'Weight loss',
                    'image_url' => 'Tesamorelin-05mg.webp',
                    'slug' => 'tesamorelin-10mg',
                ],
                [
                    'title' => 'Tirzepatide [ 5mg ]',
                    'currency' => '$',
                    'price' => '249.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'Tirzepatide, the same active ingredient in Mounjaro®, represents the latest and most potent GLP-1 class medication for sustained weight loss. Patients have experienced an impressive average weight reduction of 24.3% over 72 weeks, in conjunction with a calorie-restricted diet and heightened physical activity. This dual-action GLP-1/GIP is for individuals with obesity (BMI ≥30) or overweight (BMI ≥27) accompanied by a weight-related condition, alongside dietary and exercise modifications.',
                    'list_sub_title' => 'Weight loss',
                    'image_url' => 'Tirzepatide-0mg.webp',
                    'slug' => 'tirzepatide-5mg',
                ],
                [
                    'title' => 'GHK-CU',
                    'currency' => '$',
                    'price' => '0.00',
                    'list_one_title' => 'Peptides',
                    'list_two_title' => 'GHK-Cu is a natural peptide found in human blood plasma, urine, and saliva. Research in animals indicates that GHK-Cu can enhance wound healing, boost immune function, and improve skin health by stimulating collagen production, activating fibroblasts, and promoting blood vessel growth. Evidence suggests that it acts as a feedback signal generated after tissue injury. Additionally, GHK-Cu suppresses free-radical damage, making it a potent antioxidant.',
                    'list_sub_title' => 'Skin Regeneration',
                    'image_url' => 'GHK-Cu-10mg.webp',
                    'slug' => 'GHK-CU',
                ],
            ],
        ];

        if (isset($plansData[$type])) {
            foreach ($plansData[$type] as $plan) {
                PlanV1::create($plan);
            }
            $this->info('Plans data inserted successfully.');
        } else {
            $this->error('Invalid type provided.');
        } */



        $data = [
            [
                "Category" => "Weight Loss",
                "Sub-Category" => "GLP-1 Weight Loss",
                "Drug" => "Semaglutide Injection",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 22.5,
                "Description" => "GLP-1 Weight Loss Injection",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Weight Loss",
                "Sub-Category" => "GLP-1 Weight Loss",
                "Drug" => "Semaglutide Oral Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 22.5,
                "Description" => "GLP-1 Weight Loss Injection",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Weight Loss",
                "Sub-Category" => "GLP-1 Weight Loss",
                "Drug" => "Semaglutide Oral Suspension",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 22.5,
                "Description" => "GLP-1 Weight Loss Injection",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Weight Loss",
                "Sub-Category" => "GLP-1 Weight Loss",
                "Drug" => "Semaglutide Oral Troche",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 22.5,
                "Description" => "GLP-1 Weight Loss Injection",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Weight Loss",
                "Sub-Category" => "GLP-1 Weight Loss",
                "Drug" => "Tirzepatide Injection",
                "Supply" => "1 Month or +",
                "Retail Cost" => 599,
                "Plus Shipping Cost" => 22.5,
                "Description" => "GLP-1 Weight Loss Injection",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Health & Wellness",
                "Sub-Category" => "Hair Loss/Regrowth",
                "Drug" => "Hair Loss Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 99,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Stopping Hair Loss/Hair Regrowth",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Health & Wellness",
                "Sub-Category" => "Hair Loss/Regrowth",
                "Drug" => "Hair Loss Topical Solution",
                "Supply" => "1 Month or +",
                "Retail Cost" => 99,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Stopping Hair Loss/Hair Regrowth",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Health & Wellness",
                "Sub-Category" => "Menopausal",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Health & Wellness",
                "Sub-Category" => "Pain and Mental Wellness",
                "Drug" => "Low Dose Naltrexone ",
                "Supply" => "1 Month or +",
                "Retail Cost" => 69,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Treats Pain, Depression, Chronic Fatigue",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Sexual Health",
                "Sub-Category" => "Sexual Health",
                "Drug" => "OXYTOCIN 250 unit, 500 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 89,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Female Sexual Health Solutions",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Sexual Health",
                "Sub-Category" => "Sexual Health",
                "Drug" => "SCREAM CREAM (Arginine 60 mg/Pentoxifylline 50 mg/Sildenafil 10 mg/Testosterone 1 mg/gm)",
                "Supply" => "1 Month or +",
                "Retail Cost" => 79,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Female Sexual Health Solutions",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Sexual Health",
                "Sub-Category" => "Sexual Health",
                "Drug" => "TADALAFIL 2.5 mg/PT141 1mg/Oxytocin 250 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Female Sexual Health Solutions",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Female Sexual Health",
                "Sub-Category" => "Sexual Health",
                "Drug" => "TADALAFIL 5 mg/PT141 2 mg/Oxytocin 500 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Female Sexual Health Solutions",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hair Loss/Regrowth",
                "Drug" => "Hair Loss Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 99,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Stopping Hair Loss/Hair Regrowth",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hair Loss/Regrowth",
                "Drug" => "Hair Loss Topical Solution",
                "Supply" => "1 Month or +",
                "Retail Cost" => 99,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Stopping Hair Loss/Hair Regrowth",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Clomiphine Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 69,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Testosterone Levels, Low Energy",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Enclomaphine Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Testosterone Levels, Low Energy",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "HGH (Zomacton)",
                "Supply" => "1 Week",
                "Retail Cost" => 549,
                "Plus Shipping Cost" => 22.5,
                "Description" => "Human Growth Hormone",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Nandralone Injection",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 22.5,
                "Description" => "Promotes Lean Muscle, Endurance, Healing, Increase Bone Density",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Oxandralone Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 159,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Maintain Weight, Decrease Muscle Loss",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Sermorelin Injection",
                "Supply" => "1 Month or +",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 22.5,
                "Description" => "Growth Homrone Promotes Lean Muscle, Endurance, Healing, Sleep",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Stanozolol Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 109,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Retention of Lean Muscle",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "T3/T4 Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 69,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Thyroid Deficiency",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Testosterone Cream",
                "Supply" => "1 Month or +",
                "Retail Cost" => 139,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Testosterone Levels, Low Energy",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Hormone Therapy",
                "Drug" => "Testosterone Injection",
                "Supply" => "10 Week Supply",
                "Retail Cost" => 139,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Testosterone Levels, Low Energy",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "OXYTOCIN 250 unit, 500 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 89,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "Sildenafil (Viagra)",
                "Supply" => "1 Month or +",
                "Retail Cost" => 69,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "Tadalafil (Cialas)",
                "Supply" => "1 Month or +",
                "Retail Cost" => 69,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "TADALAFIL 10 mg/PT-141 2 mg/Oxytocin 250 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "TADALAFIL 20 mg/PT-141 2 mg/Oxytocin 500 unit tab triturate",
                "Supply" => "Per Dose, Qty 15",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Sexual Health",
                "Sub-Category" => "Erectile Dysfunction",
                "Drug" => "Trimix Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Erectile Dysfuction Solutions",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "AOD 600 mcg cap",
                "Supply" => "1 Month or +",
                "Retail Cost" => 139,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Weight Loss - Speed Metabolism, Burn Fat",
                "__EMPTY" => "Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "BPC-157 500 mcg cap",
                "Supply" => "1 Month or +",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Promotes GI Protection, Wound Healing, Muscle Recovery, Anabolic Effects",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "DIHEXA 10mg Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 159,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Enhances Memory and Cognition",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "DIHEXA 20mg Capsule",
                "Supply" => "1 Month or +",
                "Retail Cost" => 299,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Enhances Memory and Cognition",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "DSIP 500 mcg cap",
                "Supply" => "1 Month or +",
                "Retail Cost" => 119,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Promotes Sleep, Regulates Circadian Rythms, Reduces Pain, Improves Mood",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "KPV 500 mcg cap",
                "Supply" => "1 Month or +",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Lowers Inflammation, Improves Gut Health",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "KPV 500 mcg/BPC-157 mcg cap",
                "Supply" => "1 Month or +",
                "Retail Cost" => 139,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Lowers Inflammation, Improves Gut Health",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "NAD+ 300 mg/mL Nasal Spray",
                "Supply" => "1 Month or +",
                "Retail Cost" => 99,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Energy, Cell Repair, Overall Health",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Peptides",
                "Sub-Category" => "Oral Peptides",
                "Drug" => "NAD+ 400 mg patch",
                "Supply" => "4 Patches",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Energy, Cell Repair, Overall Health",
                "__EMPTY" => "One time + Subscription"
            ],
            [
                "Category" => "Female Health & Wellness",
                "Sub-Category" => "Energy",
                "Drug" => "B12 Injections",
                "Supply" => "10mL",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Energy",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Category" => "Male Health & Wellness",
                "Sub-Category" => "Energy",
                "Drug" => "B12 Injections",
                "Supply" => "10mL",
                "Retail Cost" => 129,
                "Plus Shipping Cost" => 12.5,
                "Description" => "Low Energy",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ],
            [
                "Drug" => "Rapamycin",
                "__EMPTY" => "One time + Subscription",
                "__EMPTY_1" => "Prescription required. "
            ]
        ];





        foreach ($data as $item) {
            if (!isset($item['Drug']))
                continue;
            if (!isset($item['Description']))
                continue;
            // Find the existing record based on title and list_two_title
            $existingPlan = PlanV1::where('title', $item['Drug'])
                ->where('list_two_title', $item['Description'])
                ->first();
            $is_prescription_required = false;
            if (isset($item['__EMPTY_1']) && $item['__EMPTY_1'] == "Prescription required. ")
                $is_prescription_required = true;
            if ($existingPlan) {
                // Update the existing record
                $existingPlan->update([
                    'currency' => '$',
                    'price' => $item['Retail Cost'] ?? 0,
                    'shipping_cost' => $item['Plus Shipping Cost'] ?? 0,
                    'list_one_title' => "hgh",
                    'is_prescription_required' => $is_prescription_required,
                    'list_sub_title' => $item['Description'] ?? "",
                    'list_sub_title' => $item['Description'] ?? "",
                    'slug' => PlanV1::generateUniqueSlug($item['Drug']),
                ]);
            } else {
                // Create a new record
                PlanV1::create([
                    'title' => $item['Drug'],
                    'currency' => '$',
                    'price' => $item['Retail Cost'] ?? 0,
                    'shipping_cost' => $item['shipping_cost'] ?? 0,
                    'list_one_title' => "hgh",
                    'is_prescription_required' => $is_prescription_required,
                    'list_two_title' => $item['Description'] ?? "",
                    'list_sub_title' => $item['Description'] ?? "",
                    'slug' => PlanV1::generateUniqueSlug($item['Drug']),
                ]);
            }
        }

        return 0;
    }
}
