function __construct()
 {
     $this->icon = array();
     $this->social = array();
     $this->style = array('social-icon' => array('use' => 2, 'path' => $this->getStyleURL(), 'file' => 'style.css'));
     $this->script = array('social-icon' => array('use' => 2, 'path' => $this->getScriptURL(), 'file' => 'PB.SocialIcon.js'));
     if (PBComponentData::get($this->getComponentId(), 'icon_type') == 'gr') {
         $this->icon['url'] = PBComponentData::get($this->getComponentId(), 'icon_url');
         $this->icon['path'] = PBComponentData::get($this->getComponentId(), 'icon_path');
         $this->icon['file'] = PBComponentData::setFile($this->getComponentId(), 'icon_file', $this->icon['path']);
         foreach ($this->icon['file'] as $value) {
             $pathinfo = pathinfo($this->icon['path'] . $value);
             $name = ucfirst(preg_replace(array('/-/', '/_/'), ' ', $pathinfo['filename']));
             $this->social[$pathinfo['filename']] = array($name, $value);
         }
     } else {
         $this->social = array('behance' => array('Behance', 'behance'), 'deviantart' => array('Deviantart', 'deviantart'), 'digg' => array('Digg', 'digg'), 'dribbble' => array('DribbBle', 'dribbble'), 'facebook' => array('Facebook', 'facebook'), 'flickr' => array('Flickr', 'flickr'), 'foursquare' => array('Foursquare', 'foursquare'), 'googleplus' => array('Google+', 'google-plus'), 'instagram' => array('Instagram', 'instagram'), 'linkedin' => array('Linkedin', 'linkedin'), 'pinterest' => array('Pinterest', 'pinterest'), 'reddit' => array('Reddit', 'reddit'), 'rss' => array('RSS', 'rss'), 'skype' => array('Skype', 'skype'), 'soundcloud' => array('Soundcloud', 'soundcloud'), 'spotify' => array('Spotify', 'spotify'), 'stumbleupon' => array('Stumbleupon', 'stumbleupon'), 'tumblr' => array('Tumblr', 'tumblr'), 'twitter' => array('Twitter', 'twitter'), 'vimeo' => array('Vimeo', 'vimeo-square'), 'xing' => array('Xing', 'xing'), 'youtube' => array('Youtube', 'youtube'));
     }
     $Window = new PBWindow();
     $group = array(1 => array('header' => __('Dimension', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Dimension of the icon in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 2 => array('header' => __('Normal state', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Styles for normal state', PLUGIN_PAGE_BUILDER_DOMAIN)), 3 => array('header' => __('Hover state', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Styles for hover state', PLUGIN_PAGE_BUILDER_DOMAIN)), 4 => array('header' => __('Border radius', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('Border radius in order: top left, top right, bottom right, bottom left', PLUGIN_PAGE_BUILDER_DOMAIN)));
     $start = count($group) + 1;
     $i = $start;
     foreach ($this->social as $index => $value) {
         $group[$i] = array('header' => $value[0], 'subheader' => sprintf(__('Settings for %s', PLUGIN_PAGE_BUILDER_DOMAIN), $value[0]));
         $i++;
     }
     $this->component = array('name' => __('Social Icons', PLUGIN_PAGE_BUILDER_DOMAIN), 'description' => __('Displays Social Icons', PLUGIN_PAGE_BUILDER_DOMAIN), 'structure' => array('window' => array('title' => __('Social Icons', PLUGIN_PAGE_BUILDER_DOMAIN)), 'ui' => array('panel' => array(1 => array('header' => __('General', PLUGIN_PAGE_BUILDER_DOMAIN)), 2 => array('header' => __('Styles', PLUGIN_PAGE_BUILDER_DOMAIN)), 3 => array('header' => __('Profiles', PLUGIN_PAGE_BUILDER_DOMAIN))), 'group' => $group), 'element' => array(array('id' => 'target', 'ui' => array('panel' => 1, 'text' => array('header' => __('Target of the links', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'radio', 'dictionary' => array('source' => PBHelper::extractDictionary($Window->linkTarget)))), 'shortcode' => array('default' => '_blank')), array('id' => 'css_class', 'ui' => array('panel' => 1, 'text' => array('header' => __('CSS class', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => __('List of CSS classes defined in CSS files separated by space', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'native_color_enable', 'ui' => array('panel' => 2, 'text' => array('header' => __('Native colors', PLUGIN_PAGE_BUILDER_DOMAIN), 'subheader' => array(__('Use native colors for social icons (for both states: normal and hover)', PLUGIN_PAGE_BUILDER_DOMAIN))), 'element' => array('type' => 'choice-2')), 'shortcode' => array('default' => '0')), array('id' => 'width', 'ui' => array('panel' => 2, 'group' => 1, 'text' => array('label' => __('Width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'height', 'ui' => array('panel' => 2, 'group' => 1, 'text' => array('label' => __('Height in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'font_icon_size', 'ui' => array('panel' => 2, 'group' => 1, 'text' => array('label' => __('Icon size in pixels. Value 0 means that default size for will be used', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'slider', 'value' => 0, 'option' => array('min' => 0, 'max' => 200)))), array('id' => 'border_radius_top_left', 'ui' => array('panel' => 2, 'group' => 4, 'text' => array('label' => __('Top left in pixels:', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_radius_top_right', 'ui' => array('panel' => 2, 'group' => 4, 'text' => array('label' => __('Top right in pixels:', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_radius_bottom_right', 'ui' => array('panel' => 2, 'group' => 4, 'text' => array('label' => __('Bottom right in pixels:', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_radius_bottom_left', 'ui' => array('panel' => 2, 'group' => 4, 'text' => array('label' => __('Bottom left in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_width', 'ui' => array('panel' => 2, 'group' => 2, 'text' => array('label' => __('Border width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_color', 'ui' => array('panel' => 2, 'group' => 2, 'text' => array('label' => __('Border color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))), array('id' => 'icon_color', 'ui' => array('panel' => 2, 'group' => 2, 'text' => array('label' => __('Icon color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))), array('id' => 'bg_color', 'ui' => array('panel' => 2, 'group' => 2, 'text' => array('label' => __('Background color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))), array('id' => 'border_width_hover', 'ui' => array('panel' => 2, 'group' => 3, 'text' => array('label' => __('Border width in pixels', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '3')))), array('id' => 'border_color_hover', 'ui' => array('panel' => 2, 'group' => 3, 'text' => array('label' => __('Border color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))), array('id' => 'font_icon_color_hover', 'ui' => array('panel' => 2, 'group' => 3, 'text' => array('label' => __('Icon color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))), array('id' => 'bg_color_hover', 'ui' => array('panel' => 2, 'group' => 3, 'text' => array('label' => __('Background color in HEX', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('type' => 'color-picker'))))));
     if (PBComponentData::get($this->getComponentId(), 'icon_type') === 'gr') {
         PBHelper::unsetComponentElementById($this->component['structure']['element'], array('font_icon_size', 'font_icon_color_hover', 'font_icon_color_hover'));
     }
     $i = $start;
     foreach ($this->social as $index => $value) {
         array_push($this->component['structure']['element'], array('id' => 'profile_' . $index . '_url', 'ui' => array('panel' => 3, 'group' => $i, 'text' => array('label' => __('URL', PLUGIN_PAGE_BUILDER_DOMAIN)))), array('id' => 'profile_' . $index . '_order', 'ui' => array('panel' => 3, 'group' => $i, 'text' => array('label' => __('Order', PLUGIN_PAGE_BUILDER_DOMAIN)), 'element' => array('attribute' => array('maxlength' => '2')))));
         $i++;
     }
     parent::__construct();
 }