/**
  * metabox content for all template pack and variation selection.
  *
  * @since 4.5.0
  *
  * @return string
  */
 public function template_pack_meta_box()
 {
     $this->_set_message_template_group();
     //setup template pack select values.
     $template_packs = EED_Messages::get_template_packs();
     $tp_select_values = array();
     foreach ($template_packs as $tp) {
         //only include template packs that support this messenger and message type!
         $supports = $tp->get_supports();
         if (!isset($supports[$this->_message_template_group->messenger()]) || !in_array($this->_message_template_group->message_type(), $supports[$this->_message_template_group->messenger()])) {
             //not supported
             continue;
         }
         $tp_select_values[] = array('text' => $tp->label, 'id' => $tp->dbref);
     }
     //if empty $tp_select_values then we make sure default is set because EVERY message type should be supported by the default template pack.  This still allows for the odd template pack to override.
     if (empty($tp_select_values)) {
         $tp_select_values[] = array('text' => __('Default', 'event_espresso'), 'id' => 'default');
     }
     //setup variation select values for the currently selected template.
     $variations = $this->_message_template_group->get_template_pack()->get_variations($this->_message_template_group->messenger(), $this->_message_template_group->message_type());
     $variations_select_values = array();
     foreach ($variations as $variation => $label) {
         $variations_select_values[] = array('text' => $label, 'id' => $variation);
     }
     $template_pack_labels = $this->_message_template_group->messenger_obj()->get_supports_labels();
     $template_args['template_packs_selector'] = EEH_Form_Fields::select_input('MTP_template_pack', $tp_select_values, $this->_message_template_group->get_template_pack_name());
     $template_args['variations_selector'] = EEH_Form_Fields::select_input('MTP_template_variation', $variations_select_values, $this->_message_template_group->get_template_pack_variation());
     $template_args['template_pack_label'] = $template_pack_labels->template_pack;
     $template_args['template_variation_label'] = $template_pack_labels->template_variation;
     $template_args['template_pack_description'] = $template_pack_labels->template_pack_description;
     $template_args['template_variation_description'] = $template_pack_labels->template_variation_description;
     $template = EE_MSG_TEMPLATE_PATH . 'template_pack_and_variations_metabox.template.php';
     EEH_Template::display_template($template, $template_args);
 }