dispatch("click_outside")}
class:anchor_default={anchor === "default"}
class:anchor_center={anchor === "center"}
class:anchor_top={anchor === "top"}
bind:this={wrap_el}
bind:clientWidth={c_width}
bind:clientHeight={c_height}
class:anchor={`${left_anchor}px`}
>
{#if color_mode === "defaults"}
{#if color_picker}
(color_picker = false)}
on:selected={({ detail }) => (selected_color = detail)}
/>
{/if}
{/if}
{#if show_swatch}
handle_color_selection(detail, "core")}
on:edit={({ detail }) => handle_color_selection(detail, "user")}
user_colors={color_mode === "defaults" ? recent_colors : null}
{selected_color}
{current_mode}
/>
{/if}
{#if color_picker || show_swatch}
{/if}