<?php
/**
* @package JPageBuilder
* @author Joomla! Extensions Store
* @copyright (C) 2024 - Joomla! Extensions Store
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
//no direct access
defined ('_JEXEC') or die ('Restricted access');

use Joomla\CMS\Language\Text;

JpagebuilderConfig::addonConfig([
	'type'       => 'content',
	'addon_name' => 'flickr',
	'category'   => 'Social',
	'title'      => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR'),
	'desc'       => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_DESC'),
	'category'   => 'Media',
	'icon'       => '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 21.7a5.2 5.2 0 100-10.4 5.2 5.2 0 000 10.4zm0 2.3a7.5 7.5 0 100-15 7.5 7.5 0 000 15z" fill="currentColor"/><path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M24.5 21.7a5.2 5.2 0 100-10.4 5.2 5.2 0 000 10.4zm0 2.3a7.5 7.5 0 100-15 7.5 7.5 0 000 15z" fill="currentColor"/></svg>',
	'settings' => [
		'content' => [
			'title' => Text::_('COM_JPAGEBUILDER_GLOBAL_CONTENT'),
			'fields' => [
				'id' => [
					'type'  => 'text',
					'title' => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_ID'),
					'desc'  => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_ID_DESC'),
					'inline' => true,
				],

				'api' => [
					'type'  => 'text',
					'title' => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_API'),
					'desc'  => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_API_DESC'),
					'inline' => true,
				],

				'count' => [
					'type'  => 'slider',
					'title' => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_COUNT'),
					'desc'  => Text::_('COM_JPAGEBUILDER_ADDON_FLICKR_COUNT_DESC'),
					'min'	=> 1,
					'max'	=> 100,
					'std'   => 6,
				],

				'thumb_per_row' => [
					'type'  => 'slider',
					'title' => Text::_('COM_JPAGEBUILDER_ADDON_TITLE_THUMB_PER_ROW'),
					'min'	=> 1,
					'max'	=> 100,
					'std'   => 4,
				],
			],
		],

		'title' => [
			'title' => Text::_('COM_JPAGEBUILDER_GLOBAL_TITLE_OPTIONS'),
			'fields' => [
				'title' => [
					'type'  => 'text',
					'title' => Text::_('COM_JPAGEBUILDER_ADDON_TITLE'),
					'desc'  => Text::_('COM_JPAGEBUILDER_ADDON_TITLE_DESC'),
				],
	
				'heading_selector' => [
					'type'   => 'headings',
					'title'  => Text::_('COM_JPAGEBUILDER_ADDON_HEADINGS'),
					'desc'   => Text::_('COM_JPAGEBUILDER_ADDON_HEADINGS_DESC'),
					'std'   => 'h3',
				],

				'title_typography' => [
					'type'     => 'typography',
					'title'  => Text::_('COM_JPAGEBUILDER_GLOBAL_TYPOGRAPHY'),
					'fallbacks'   => [
						'font' => 'title_font_family',
						'size' => 'title_fontsize',
						'line_height' => 'title_lineheight',
						'letter_spacing' => 'title_letterspace',
						'uppercase' => 'title_font_style.uppercase',
						'italic' => 'title_font_style.italic',
						'underline' => 'title_font_style.underline',
						'weight' => 'title_font_style.weight',
					],
				],

				'title_text_color' => [
					'type'   => 'color',
					'title'  => Text::_('COM_JPAGEBUILDER_ADDON_GLOBAL_COLOR')
				],

				'title_margin_top' => [
					'type'       => 'slider',
					'title'      => Text::_('COM_JPAGEBUILDER_GLOBAL_MARGIN_TOP'),
					'max'        => 400,
					'responsive' => true,
				],
			
				'title_margin_bottom' => [
					'type'       => 'slider',
					'title'      => Text::_('COM_JPAGEBUILDER_GLOBAL_MARGIN_BOTTOM'),
					'max'        => 400,
					'responsive' => true,
				],
			],
		],
	],
]);
