import { Component } from '@angular/core';
import { NgpContextMenuItem } from 'ng-primitives/context-menu';

@Component({
  selector: 'button[<% if (prefix) { %><%= prefix %>-<% } %>context-menu-item]',
  hostDirectives: [NgpContextMenuItem],
  host: { type: 'button' },
  template: `
    <ng-content />
  `,
  styles: `
/* These styles rely on CSS variables that can be imported from ng-primitives/example-theme/index.css in your global styles */

    :host {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 8px 6px 14px;
      border: none;
      background: none;
      cursor: pointer;
      transition: background-color 0.2s;
      border-radius: 4px;
      min-width: 120px;
      text-align: start;
      outline: none;
      font-size: 14px;
      font-weight: 400;
    }

    :host[data-hover] {
      background-color: var(--ngp-background-active);
    }

    :host[data-focus-visible] {
      outline: 2px solid var(--ngp-focus-ring);
      z-index: 1;
    }

    /* Reduce motion for users who prefer reduced motion. */
    @media (prefers-reduced-motion: reduce) {
      :host {
        transition-duration: 0s;
      }
    }
  `,
})
export class ContextMenuItem<%= componentSuffix %> {}
