*/
namespace ThemeAtelier\Darkify\Admin\Views;
use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify;
class SwitcherStyle
{
/**
* Create Option fields for the setting options.
*
* @param string $prefix Option setting key prefix.
* @return void
*/
public static function options($prefix)
{
Darkify::createSection(
$prefix,
array(
'title' => esc_html__('SWITCHES', 'darkify'),
'icon' => 'icofont-toggle-on',
'fields' => array(
array(
'type' => 'section_tab',
'tabs' => array(
array(
'title' => esc_html__('Customization', 'darkify'),
'icon' => 'icofont-ui-theme',
'fields' => array(
array(
'id' => 'enable_dark_switcher',
'type' => 'image_select',
'title' => esc_html__('Switch Toggler', 'darkify'),
'title_help' =>
'
' .
__('Choose the default floating switch toggler.', 'darkify') .
'
' .
'' .
esc_html__('Live Demo', 'darkify') .
'' .
'' .
esc_html__('Open Docs', 'darkify') .
'',
'class' => 'icon_select ',
'options' => array(
'classic' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/classic.svg',
'text' => esc_html__('Classic', 'darkify'),
'option_demo_url' => '',
),
'expand' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/expand.svg',
'text' => esc_html__('Expand', 'darkify'),
'option_demo_url' => '',
),
'inner-moon' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/inner-moon.svg',
'text' => esc_html__('Inner Moon', 'darkify'),
'option_demo_url' => '',
),
'within' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/within.svg',
'text' => esc_html__('Within', 'darkify'),
'option_demo_url' => '',
),
'orbit' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/orbit.svg',
'text' => esc_html__('Orbit', 'darkify'),
'option_demo_url' => '',
),
'around' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/around.svg',
'text' => esc_html__('Around', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'dark-side' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-side.svg',
'text' => esc_html__('Dark Side', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'horizon' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/horizon.svg',
'text' => esc_html__('Horizon', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'eclipse' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/eclipse.svg',
'text' => esc_html__('Eclipse', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'lightbulb' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/lightbulb.svg',
'text' => esc_html__('Lightbulb', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'dark-inner' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-inner.svg',
'text' => esc_html__('Dark Inner', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'half-sun' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/half-sun.svg',
'text' => esc_html__('Half Sun', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'simple' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/simple.svg',
'text' => esc_html__('Simple', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'duality' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/duality.svg',
'text' => esc_html__('Duality', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'dual' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dual.svg',
'text' => esc_html__('Dual', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
'shift' => array(
'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/shift.svg',
'text' => esc_html__('Shift', 'darkify'),
'option_demo_url' => '',
'pro_only' => true,
),
),
'default' => 'classic',
),
array(
'id' => 'switch_size',
'type' => 'button_set',
'title' => esc_html__('Switch Size', 'darkify'),
'title_help' => '' . esc_html__('Choose the size of the floating toggle switch as you need.', 'darkify') . '
' . esc_html__('Live Demo', 'darkify') . '' . esc_html__('Open Docs', 'darkify') . '',
'options' => array(
'0.6' => esc_html__('XS', 'darkify'),
'0.8' => esc_html__('S', 'darkify'),
'1' => esc_html__('M', 'darkify'),
'1.2' => esc_html__('L', 'darkify'),
'1.4' => esc_html__('XL', 'darkify'),
'1.6' => esc_html__('XXL', 'darkify'),
'custom' => esc_html__('Custom', 'darkify'),
),
'default' => '1',
),
array(
'id' => 'switch_size_custom',
'type' => 'slider',
'title' => esc_html__('Custom Switch Size', 'darkify'),
'title_help' => '' . esc_html__('Scale in percentage relative to normal size.', 'darkify') . '
' . esc_html__('Live Demo', 'darkify') . '' . esc_html__('Open Docs', 'darkify') . '',
'default' => '100',
'min' => 40,
'max' => 300,
'dependency' => array('switch_size', '==', 'custom')
),
array(
'id' => 'switch_background',
'type' => 'color_group',
'title' => esc_html__('Switch Background', 'darkify'),
'title_help' => '' .
__('Customize the floating switch background to match your design.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'switch_light_mode_bg' => esc_html__('Light Mode', 'darkify'),
'switch_dark_mode_bg' => esc_html__('Dark Mode', 'darkify'),
),
'default' => array(
'switch_light_mode_bg' => '#121116',
'switch_dark_mode_bg' => '#ffffff',
)
),
array(
'id' => 'switch_icon_color',
'type' => 'color_group',
'title' => esc_html__('Switch Icon Color', 'darkify'),
'title_help' => '' .
__('Customize the floating switch icon color as needed.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'switch_light_mode_color' => esc_html__('Light Mode', 'darkify'),
'switch_dark_mode_color' => esc_html__('Dark Mode', 'darkify'),
),
'default' => array(
'switch_light_mode_color' => '#ffffff',
'switch_dark_mode_color' => '#121116',
),
),
array(
'id' => 'switch_border',
'type' => 'border',
'title' => esc_html__('Switch Border', 'darkify'),
'title_help' =>
'' .
__('Customize the floating switch border and border radius.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'color' => true,
'style' => false,
'color2' => false,
'all' => true,
'radius' => true,
'default' => array(
'color' => '#121116',
'color3' => '#ffffff',
'all' => 0,
'radius' => 7,
),
),
array(
'id' => 'tooltip_on_floating_switch',
'type' => 'fieldset',
'fields' => array(
array(
'id' => 'floating_switch_width',
'type' => 'switcher',
'title' => esc_html__('Tooltip on Floating Switch', 'darkify'),
'title_help' =>
'' .
__('Display a tooltip hint on the dark mode floating switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'text_on' => esc_html__('Enabled', 'darkify'),
'text_off' => esc_html__('Disabled', 'darkify'),
'text_width' => 100,
'default' => false,
),
array(
'id' => 'tooltip_position',
'type' => 'button_set',
'title' => esc_html__('Tooltip Position', 'darkify'),
'title_help' =>
'' .
__('Choose where the tooltip should appear relative to the floating switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'left' => esc_html__('Left', 'darkify'),
'right' => esc_html__('Right', 'darkify'),
'top' => esc_html__('Top', 'darkify'),
'bottom' => esc_html__('Bottom', 'darkify'),
),
'default' => 'left',
'dependency' => array('floating_switch_width', '==', 'true'),
),
array(
'id' => 'tooltip_text',
'type' => 'text',
'title' => esc_html__('Tooltip Text', 'darkify'),
'title_help' =>
'' .
__('Add tooltip text for floating switch toggler.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'default' => esc_html__('Toggle Dark Mode', 'darkify'),
'dependency' => array('floating_switch_width', '==', 'true'),
),
array(
'id' => 'tooltip_color',
'type' => 'color_group',
'title' => esc_html__('Tooltip Color', 'darkify'),
'title_help' =>
'' .
__('Customize the tooltip colors and appearance.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'tooltip_background_color' => esc_html__('Background', 'darkify'),
'tooltip_text_color' => esc_html__('Color', 'darkify'),
),
'default' => array(
'tooltip_background_color' => '#142434',
'tooltip_text_color' => '#B0CBE7',
),
'dependency' => array('floating_switch_width', '==', 'true'),
),
),
),
array(
'id' => 'alternative_dark_mode_switcher',
'type' => 'text',
'title' => esc_html__('Alternative Dark Mode Switch', 'darkify'),
'title_help' =>
'' .
__('Enter comma-separated CSS class or ID selectors to use them as alternative dark mode switches.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'placeholder' => esc_html__('e.g., .my-dark-switch, #dark-mode-toggle', 'darkify'),
),
array(
'id' => 'switcher_shortcode',
'type' => 'switcher_shortcode',
'title' => esc_html__('Switcher Shortcode', 'darkify'),
'title_help' => '' .
__('Copy this shortcode and place it on any page or post to display the switcher. You can customize all values, including Switcher styles 1–5, which are available in the current version of the plugin.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'dependency' => array('enable_dark_switcher', 'not-any', 'orbit,duality,dual,shift'),
),
array(
'id' => 'switcher_shortcode_v2',
'type' => 'switcher_shortcode_v2',
'title' => esc_html__('Switcher Shortcode', 'darkify'),
'title_help' => '' .
__('Copy this shortcode and place it on any page or post to display the switcher. You can customize all available options, including switch styles 1–5, which are available in the current version of the plugin.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'dependency' => array('enable_dark_switcher', 'any', 'orbit,duality,dual,shift'),
),
)
),
array(
'title' => esc_html__('Positioning', 'darkify'),
'icon' => 'icofont-hand-drag',
'fields' => array(
// Switch Position
array(
'id' => 'switcher_button_position',
'type' => 'fieldset',
'fields' => array(
array(
'id' => 'dark_mode_switch_position',
'type' => 'button_set',
'title' => esc_html__('Switch Position', 'darkify'),
'title_help' =>
'' .
__('Choose the screen position where the floating switch should be displayed.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'bottom_right' => esc_html__('Bottom Right', 'darkify'),
'bottom_left' => esc_html__('Bottom Left', 'darkify'),
'top_right' => esc_html__('Top Right', 'darkify'),
'top_left' => esc_html__('Top Left', 'darkify'),
),
'default' => 'bottom_right',
),
array(
'id' => 'switch_position_top_right',
'type' => 'spacing',
'title' => esc_html__('Margin From Top Right', 'darkify'),
'title_help' =>
'' .
__('Customize default margin from the top right of the Floating Switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'left' => false,
'bottom' => false,
'units' => ['px'],
'default' => array(
'top' => '40',
'right' => '40',
),
'dependency' => array('dark_mode_switch_position', '==', 'top_right'),
),
array(
'id' => 'switch_position_top_left',
'type' => 'spacing',
'title' => esc_html__('Margin from Top Left', 'darkify'),
'title_help' =>
'' .
__('Customize the default margin from the top-left position of the floating switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'right' => false,
'bottom' => false,
'units' => ['px'],
'default' => array(
'top' => '40',
'left' => '40',
),
'dependency' => array('dark_mode_switch_position', '==', 'top_left'),
),
array(
'id' => 'switch_position_bottom_right',
'type' => 'spacing',
'title' => esc_html__('Margin From Bottom Right', 'darkify'),
'title_help' =>
'' .
__('Customize the default margin from the bottom-right position of the floating switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'left' => false,
'top' => false,
'units' => ['px'],
'default' => array(
'bottom' => '40',
'right' => '40',
),
'dependency' => array('dark_mode_switch_position', '==', 'bottom_right'),
),
array(
'id' => 'switch_position_bottom_left',
'type' => 'spacing',
'title' => esc_html__('Margin from Bottom Left', 'darkify'),
'title_help' =>
'' .
__('Customize the default margin from the bottom-left position of the floating switch.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'right' => false,
'top' => false,
'units' => ['px'],
'default' => array(
'bottom' => '40',
'left' => '40',
),
'dependency' => array('dark_mode_switch_position', '==', 'bottom_left'),
),
),
),
// Different Switch Position in Mobile
array(
'id' => 'different_switch_in_mobile',
'type' => 'fieldset',
'fields' => array(
array(
'id' => 'switch_position_different_in_mobile',
'type' => 'switcher',
'title' => esc_html__('Different Switch Position on Mobile', 'darkify'),
'title_help' =>
'' .
__('Choose whether the floating switch should be displayed in a different position on mobile devices.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'text_on' => esc_html__('Yes', 'darkify'),
'text_off' => esc_html__('No', 'darkify'),
),
array(
'id' => 'switch_position_in_mobile',
'type' => 'button_set',
'title' => esc_html__('Switch Position on Mobile', 'darkify'),
'title_help' =>
'' .
__('Choose the screen position where the floating switch should be displayed on mobile devices.', 'darkify') .
'
' .
'' .
__('Live Demo', 'darkify') .
'' .
'' .
__('Open Docs', 'darkify') .
'',
'options' => array(
'bottom_right' => esc_html__('Bottom Right', 'darkify'),
'bottom_left' => esc_html__('Bottom Left', 'darkify'),
'top_right' => esc_html__('Top Right', 'darkify'),
'top_left' => esc_html__('Top Left', 'darkify'),
),
'default' => 'bottom_right',
'dependency' => array('switch_position_different_in_mobile', '==', 'true'),
),
array(
'id' => 'switch_position_top_right_in_mobile',
'type' => 'spacing',
'title' => esc_html__('Margin from Top Right on Mobile', 'darkify'),
'title_help' =>
'' .
__('Adjust the default margin from the top-right position of the floating switch on mobile devices.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'left' => false,
'bottom' => false,
'units' => ['px'],
'default' => array(
'top' => '40',
'right' => '40',
),
'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_right'),
),
array(
'id' => 'switch_position_top_left_in_mobile',
'type' => 'spacing',
'title' => esc_html__('Margin from Top Left on Mobile', 'darkify'),
'title_help' =>
'' .
__('Adjust the default margin from the top-left position of the floating switch on mobile devices.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'right' => false,
'bottom' => false,
'units' => ['px'],
'default' => array(
'top' => '40',
'left' => '40',
),
'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_left'),
),
array(
'id' => 'switch_position_bottom_right_in_mobile',
'type' => 'spacing',
'title' => esc_html__('Margin from Bottom Right on Mobile', 'darkify'),
'title_help' =>
'' .
__('Adjust the default margin from the bottom-right position of the floating switch on mobile devices.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'left' => false,
'top' => false,
'units' => ['px'],
'default' => array(
'bottom' => '40',
'right' => '40',
),
'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_right'),
),
array(
'id' => 'switch_position_bottom_left_in_mobile',
'type' => 'spacing',
'title' => esc_html__('Margin from Bottom Left on Mobile', 'darkify'),
'title_help' =>
'' .
__('Adjust the default margin from the bottom-left position of the floating switch on mobile devices.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'right' => false,
'top' => false,
'units' => ['px'],
'default' => array(
'bottom' => '40',
'left' => '40',
),
'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_left'),
),
),
),
array(
'id' => 'enable_absolute_position',
'type' => 'switcher',
'title' => esc_html__('Absolute Switch Position', 'darkify'),
'title_help' =>
'' .
__('Enable this option to allow the floating switch to scroll along with the page.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'text_on' => esc_html__('Enabled', 'darkify'),
'text_off' => esc_html__('Disabled', 'darkify'),
'text_width' => '100',
),
array(
'id' => 'enable_switch_dragging',
'type' => 'switcher',
'title' => esc_html__('Draggable Position Change', 'darkify'),
'title_help' =>
'' .
__('Enable this option to allow users to change the floating switch position by dragging it.', 'darkify') .
'
' .
__('Live Demo', 'darkify') .
'' .
__('Open Docs', 'darkify') .
'',
'text_on' => esc_html__('Enabled', 'darkify'),
'text_off' => esc_html__('Disabled', 'darkify'),
'text_width' => '100',
'class' => 'switcher_pro_only',
),
)
),
)
),
)
)
);
}
}