<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128"><defs><style>.a-thumbsdown{fill:#fff;stroke:#d83638;stroke-width:5px;}.b-thumbsdown{fill:#d83638;}.c-thumbsdown{stroke:none;}.d-thumbsdown{fill:none;}</style></defs><g transform="translate(-130.123 -203.022)"><g class="a-thumbsdown" transform="translate(130.123 203.022)"><circle class="c-thumbsdown" cx="64" cy="64" r="64"/><circle class="d-thumbsdown" cx="64" cy="64" r="61.5"/></g><path class="b-thumbsdown" d="M-18.286-7.143a2.3,2.3,0,0,0-2.286-2.286,2.3,2.3,0,0,0-2.286,2.286,2.3,2.3,0,0,0,2.286,2.286A2.3,2.3,0,0,0-18.286-7.143ZM22.857-27.714a4.726,4.726,0,0,0-4.571-4.571H5.714c0-4.179,3.429-7.214,3.429-11.429,0-4.179-.821-6.857-5.714-6.857C1.143-48.25,2.321-42.786-1.143-39.143c-1,1.036-1.857,2.143-2.75,3.25-1.607,2.071-5.857,8.179-8.679,8.179h-1.143V-4.857h1.143c2,0,5.286,1.286,7.214,1.964,3.929,1.357,8,2.607,12.214,2.607h4.571c3.964,0,6.607-1.786,6.607-5.964a12.249,12.249,0,0,0-.179-2,5.319,5.319,0,0,0,2.321-4.5,4.977,4.977,0,0,0-.643-2.464,5.685,5.685,0,0,0,1.893-4.25,6.423,6.423,0,0,0-1.25-3.679C21.857-23.179,22.857-26.393,22.857-27.714Zm4.571-.036a10.512,10.512,0,0,1-1.75,5.821A9.523,9.523,0,0,1,26-19.464a10.445,10.445,0,0,1-1.357,5.143,11.1,11.1,0,0,1,.107,1.536,10.416,10.416,0,0,1-2.143,6.357v.179C22.643.429,17.964,4.286,11.464,4.286h-4c-5.5,0-9.964-1.357-15.107-3.143A26.4,26.4,0,0,0-12.571-.286H-22.857a4.557,4.557,0,0,1-4.571-4.571V-27.714a4.557,4.557,0,0,1,4.571-4.571h9.786c1.393-.929,3.821-4.143,4.893-5.536a58.287,58.287,0,0,1,3.821-4.536c2.107-2.321,1-7.964,4.571-11.464a4.663,4.663,0,0,1,3.214-1.321c3.714,0,7.286,1.321,9.036,4.786a13.717,13.717,0,0,1,1.25,6.643A15.228,15.228,0,0,1,12-36.857h6.286A9.271,9.271,0,0,1,27.429-27.75Z" transform="translate(194.123 244.022) rotate(180)"/></g></svg>import { CssGrid, Dialog } from '@elementor/app-ui';
import SiteTemplate from '../molecules/site-template';
import { PartActionsDialogs } from '../part-actions/dialogs-and-buttons';
import { Context as TemplatesContext } from '../context/templates';
import useTemplatesScreenshot from '../hooks/use-templates-screenshot';

export default function SiteTemplates( props ) {
	const { templates: contextTemplates, action, resetActionState } = React.useContext( TemplatesContext );
	let gridColumns, templates;

	// Make the templates object a memorize value, will re run again only if
	// templates has been changed, also sort the templates by `isActive`.
	templates = React.useMemo( () => {
		return Object.values( contextTemplates )
			.sort( ( a, b ) => {
				// This sort make sure to show first the active templates, second the
				// inactive templates that are not draft, and then the drafts,
				// in each category it sorts it inside by date.

				if ( ! b.isActive && ! a.isActive ) {
					if (
						( 'draft' === b.status && 'draft' === a.status ) ||
						( 'draft' !== b.status && 'draft' !== a.status )
					) {
						return b.date < a.date ? 1 : -1;
					}

					return 'draft' === a.status ? 1 : -1;
				}

				if ( b.isActive && a.isActive ) {
					return b.date < a.date ? 1 : -1;
				}

				return b.isActive ? 1 : -1;
			} );
	}, [ contextTemplates ] );

	// Start to capture screenshots.
	useTemplatesScreenshot( props.type );

	const siteTemplateConfig = {};

	if ( props.type ) {
		templates = templates.filter( ( item ) => item.type === props.type );
		siteTemplateConfig.extended = true;
		siteTemplateConfig.type = props.type;

		switch ( props.type ) {
			case 'header':
			case 'footer':
				gridColumns = 1;
				siteTemplateConfig.aspectRatio = 'wide';
				break;
			default:
				gridColumns = 2;
		}
	}

	if ( ! templates || ! templates.length ) {
		return <h3>{ __( 'No Templates found. Want to create one?', 'elementor-pro' ) }...</h3>;
	}

	return (
		<section className="e-site-editor__site-templates">
			<PartActionsDialogs />
			{
				action.error &&
					<Dialog
						text={ action.error }
						dismissButtonText={ __( 'Go Back', 'elementor-pro' ) }
						dismissButtonOnClick={ resetActionState }
						approveButtonText={ __( 'Learn More', 'elementor-pro' ) }
						approveButtonColor="link"
						approveButtonUrl="https://go.elementor.com/app-theme-builder-template-load-issue"
						approveButtonTarget="_target"
					/>
			}
			<CssGrid columns={ gridColumns } spacing={ 24 } colMinWidth={ 200 }>
				{
					templates.map( ( item ) =>
						<SiteTemplate
							key={ item.id }
							{ ... item }
							{ ... siteTemplateConfig }
							isSelected={ parseInt( props.id ) === item.id } />,
					)
				}
			</CssGrid>
		</section>
	);
}

SiteTemplates.propTypes = {
	type: PropTypes.string,
	id: PropTypes.string,
};
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//claycafemaggiesfarm.co.za/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://claycafemaggiesfarm.co.za/page-sitemap.xml</loc>
		<lastmod>2024-11-21T11:44:56+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->