<?php

namespace App\Console\Commands;

use App\Libs\Support\SitemapGenerator;
use Illuminate\Console\Command;

class ExportContentList extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'content:export-list';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Exports a list of all published content';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $generator = new SitemapGenerator();
        $generator->exportPublishedContents();
        return 0;
    }
}
