<commit_before>import Component from '@glimmer/component';

export type SkinType = 'primary' | 'success' | 'warning' | 'danger' | 'secondary';

type SkinDefType = {
  [key in SkinType]: string;
};

const BASE_CLASS = 'upf-tag';

export const SkinDefinition: SkinDefType = {
  primary: 'regular',
  success: 'success',
  warning: 'alert',
  danger: 'critical',
  secondary: 'neutral'
};

interface OSSTagArgs {
  label?: string;
  skin?: string;
  icon?: string;
  hasEllipsis?: boolean;
}

export default class OSSTag extends Component<OSSTagArgs> {
  constructor(owner: unknown, args: OSSTagArgs) {
    super(owner, args);

    if (!args.icon && !args.label) {
      throw new Error('[component][OSS::Tag] You must pass either a @label or an @icon argument.');
    }
  }

  get skin(): string {
    if (!this.args.skin) {
      return SkinDefinition.primary;
    }
    return SkinDefinition[this.args.skin as SkinType] ?? SkinDefinition.primary;
  }

  get hasEllipsis(): boolean {
    if (!this.args.hasEllipsis) {
      return false;
    }
    return this.args.hasEllipsis;
  }

  get computedClass() {
    let classes = [BASE_CLASS];
<commit_msg>Update because of PR Review<commit_after>import Component from '@glimmer/component';

export type SkinType = 'primary' | 'success' | 'warning' | 'danger' | 'secondary';

type SkinDefType = {
  [key in SkinType]: string;
};

const BASE_CLASS = 'upf-tag';

export const SkinDefinition: SkinDefType = {
  primary: 'regular',
  success: 'success',
  warning: 'alert',
  danger: 'critical',
  secondary: 'neutral'
};

interface OSSTagArgs {
  label?: string;
  skin?: string;
  icon?: string;
  hasEllipsis?: boolean;
}

export default class OSSTag extends Component<OSSTagArgs> {
  constructor(owner: unknown, args: OSSTagArgs) {
    super(owner, args);

    if (!args.icon && !args.label) {
      throw new Error('[component][OSS::Tag] You must pass either a @label or an @icon argument.');
    }
  }

  get skin(): string {
    if (!this.args.skin) {
      return SkinDefinition.primary;
    }
    return SkinDefinition[this.args.skin as SkinType] ?? SkinDefinition.primary;
  }

  get hasEllipsis(): boolean {
    if (!this.args.hasEllipsis) {
      return false;
    }
    return this.args.hasEllipsis;
  }

  get computedClass(): string {
    let classes = [BASE_CLASS];

{'fraction_non_alphanumeric': 0.13652024117140396, 'fraction_numerical': 0.0, 'mean_word_length': 3.646, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1756277', 'n_tokens_mistral': 784, 'n_tokens_neox': 745, 'n_words': 203}