use std::any::TypeId;
use std::sync::Arc;
use indexmap::IndexMap;
use crate::engine::TemplateData;
use crate::exceptions::TemplateProcessingException;
use crate::expression::TemplateValue;
use crate::inline::IInliner;
use crate::model::{IModelFactory, IProcessableElementTag};
use crate::util::Utf16String;
use crate::{TemplateMode, TemplateResolutionAttributes};
use super::{IExpressionContext, IdentifierSequences};
pub trait ITemplateContext: IExpressionContext {
fn get_template_data(&self) -> Arc<TemplateData>;
fn get_template_mode(&self) -> TemplateMode;
fn get_template_stack(&self) -> Vec<Arc<TemplateData>>;
fn get_element_stack(&self) -> Vec<Arc<dyn IProcessableElementTag>>;
fn get_template_resolution_attributes(&self) -> Option<&TemplateResolutionAttributes>;
fn get_model_factory(&self) -> &dyn IModelFactory;
fn has_selection_target(&self) -> bool;
fn get_selection_target(&self) -> Option<Arc<TemplateValue>>;
fn get_inliner(&self) -> Option<Arc<dyn IInliner>>;
fn get_message(
&self,
origin: Option<TypeId>,
key: &Utf16String,
message_parameters: Option<&[Option<Arc<TemplateValue>>]>,
use_absent_message_representation: bool,
) -> crate::messageresolver::MessageResolutionResult<Option<Utf16String>>;
fn build_link(
&self,
base: Option<&Utf16String>,
parameters: Option<&IndexMap<Option<Utf16String>, Option<Arc<TemplateValue>>>>,
) -> Result<Utf16String, TemplateProcessingException>;
fn get_identifier_sequences(&self) -> &IdentifierSequences;
}