/**
 * Smart Team addon icon for the Divi 5 module library.
 *
 * Divi 5 does NOT read the PHP `et_builder_module_icons` filter — that is the
 * Divi 4 path (`ET_Builder_Element::get_module_icons()`). A D5 module names an
 * icon with module.json's `moduleIcon` key and Divi resolves that name against
 * a JS registry, so the same brand mark has to be shipped a second time here.
 *
 * Divi wraps this in its own <svg> and fills it from its own CSS, so the export
 * is the bare paths — no <svg> root, no width/height, no fill. The path data is
 * byte-identical to src/Admin/PageBuilders/assets/icon.svg, the source every
 * other builder reads.
 *
 * The module list and the layers drag handle render module icons through a
 * FORCED `0 0 16 16` viewport (a passed viewBox overrides the icon entry's own)
 * while the source artwork spans 24×24, so the <g> scales it down by 2/3.
 * Without that the glyph paints half again too large and clips.
 */

// Access React from global scope (Divi provides this).
const React = window?.vendor?.React;

/**
 * Icon name — the value module.json's `moduleIcon` key points at.
 *
 * @type {string}
 */
export const name = 'sptp/module-team';

/**
 * Viewport the component draws in. Divi puts this on the <svg> it wraps, and
 * its module list forces the same 16×16 grid on module icons.
 *
 * @type {string}
 */
export const viewBox = '0 0 16 16';

/**
 * Icon artwork, without the <svg> wrapper Divi supplies.
 *
 * @return {Object} React element.
 */
export const component = () => (
	<g transform="scale(0.666667)">
		<path d="M10.2371 15.9327V16.0683L8.47438 16.6106C7.9998 16.7462 7.38963 18.3055 6.91505 20.6106C8.40658 21.492 10.2371 22.0344 11.9998 22.0344C12.2032 22.0344 12.4744 22.0344 12.6778 22.0344C14.2371 21.8988 15.7964 21.492 17.0845 20.6784C16.61 18.3733 16.0676 16.814 15.5252 16.6784L13.6947 16.0683V15.9327C13.6947 15.8649 13.6269 15.7971 13.4913 15.7293L13.2879 15.5937L13.4235 15.4581C13.5591 15.3225 13.6947 15.1191 13.7625 15.0513C13.9659 14.7801 14.1693 14.4411 14.2371 14.1022C14.3049 13.9666 14.3727 13.831 14.3727 13.6954V13.6276H14.4405C14.5761 13.492 14.6439 13.3564 14.6439 13.2208V12.6784C14.6439 12.5428 14.6439 12.475 14.5083 12.3394V12.2716V11.4581C14.5083 10.2378 13.4913 9.2886 12.3388 9.2886H11.593C10.3727 9.2886 9.42353 10.3055 9.42353 11.4581V12.2716V12.3394C9.35573 12.4072 9.28794 12.5428 9.28794 12.6784V13.2208C9.28794 13.3564 9.35573 13.5598 9.49133 13.6276H9.55912V13.6954C9.55912 13.831 9.62692 13.9666 9.69472 14.1022C9.83031 14.4411 9.9659 14.7123 10.1693 15.0513C10.3049 15.1869 10.3727 15.3225 10.5083 15.4581L10.6439 15.5937L10.4405 15.7293C10.3727 15.7971 10.3049 15.8649 10.2371 15.9327Z" />
		<path d="M5.96604 19.9997C6.03383 19.7285 6.10163 19.3896 6.16943 19.1184C6.8474 16.3387 7.52536 15.7963 8.13553 15.6608L9.15248 15.3896C9.01689 15.1184 8.8135 14.8472 8.7457 14.5082C8.7457 14.4404 8.67791 14.3048 8.61011 14.237L7.52536 13.898V13.7624C7.52536 13.6946 7.45757 13.6269 7.32197 13.5591L7.11859 13.4235L7.25418 13.2879C7.38977 13.1523 7.45757 13.0167 7.59316 12.8811C7.79655 12.6099 7.99994 12.2709 8.06774 11.9997C8.13553 11.8641 8.20333 11.7285 8.20333 11.593V11.5252H8.27113C8.40672 11.3896 8.47452 11.254 8.47452 11.1184V10.576C8.47452 10.4404 8.47452 10.3726 8.33892 10.237V10.1692V9.35567C8.33892 8.13533 7.32197 7.18618 6.16943 7.18618H5.35587C4.13553 7.18618 3.18637 8.20312 3.18637 9.35567V10.1692V10.237C3.11858 10.3048 3.05078 10.4404 3.05078 10.576V11.1184C3.05078 11.254 3.11858 11.4574 3.25417 11.5252H3.32197V11.593C3.32197 11.7285 3.38976 11.8641 3.45756 11.9997C3.59315 12.3387 3.72875 12.6099 3.93214 12.9489C4.06773 13.0845 4.13553 13.2201 4.27112 13.3557L4.47451 13.4235L4.27112 13.5591C4.13553 13.6269 4.13553 13.6946 4.06773 13.7624V13.898L2.30502 14.4404C2.77959 16.6099 4.13553 18.6438 5.96604 19.9997Z" />
		<path d="M18.5086 7.05111H17.7628C16.5425 7.05111 15.5933 8.06806 15.5933 9.2206V10.0342V10.102C15.5255 10.2376 15.5255 10.3053 15.5255 10.4409V10.9833C15.5255 11.1189 15.5933 11.3223 15.7289 11.3901H15.7967V11.4579C15.8645 11.5935 15.8645 11.7291 15.9323 11.8647C16.0679 12.2037 16.2035 12.4748 16.4069 12.8138C16.4747 12.9494 16.6103 13.085 16.7459 13.2206L16.8815 13.3562L16.6781 13.4918C16.5425 13.5596 16.5425 13.6274 16.4747 13.6952V13.8308L15.3899 14.1698C15.3899 14.3053 15.3221 14.3731 15.2543 14.4409C15.1187 14.7121 14.9831 14.9833 14.8476 15.3223L15.8645 15.5935C16.4747 15.7291 17.1526 16.3392 17.8306 19.0511C17.8984 19.3901 17.9662 19.6613 18.034 20.0003C18.5764 19.5935 19.1187 19.1189 19.5933 18.5765C20.6103 17.3562 21.4238 15.9325 21.7628 14.3731L20.0001 13.8308V13.6952C20.0001 13.6274 19.9323 13.5596 19.7967 13.4918L19.4577 13.424L19.5933 13.2884C19.7289 13.1528 19.7967 13.0172 19.9323 12.8816C20.1357 12.6104 20.3391 12.2715 20.4069 12.0003C20.4747 11.8647 20.5425 11.7291 20.5425 11.5935V11.5257H20.6103C20.7459 11.3901 20.8137 11.2545 20.8137 11.1189V10.5765C20.8137 10.4409 20.8137 10.3731 20.6781 10.2376V10.1698V9.3562C20.6781 8.06806 19.7289 7.05111 18.5086 7.05111Z" />
		<path d="M12 24C5.35593 24 0 18.5763 0 12C0 5.35593 5.35593 0 12 0C18.6441 0 24 5.42373 24 12C23.9322 18.6441 18.5763 24 12 24ZM12 1.22034C6.1017 1.22034 1.28814 6.1017 1.28814 12C1.28814 17.8983 6.1017 22.7119 12 22.7119C17.8983 22.7119 22.7119 17.8983 22.7119 12C22.7119 6.1017 17.8983 1.22034 12 1.22034Z" />
	</g>
);
