> ## Documentation Index
> Fetch the complete documentation index at: https://styleguide-nextjs.2smooth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ข้อกำหนด

export const CLASSIFICATION_TERMS = {
  positive: {
    must: '+MUST',
    should: '+SHOULD',
    optional: '+OPTIONAL'
  },
  negative: {
    must: '-MUST',
    should: '-SHOULD',
    optional: '-OPTIONAL'
  }
};

export const TextHighlight = ({text = '', positive = false, negative = false}) => {
  let textColor = undefined;
  let bgColor = undefined;
  if (positive) {
    textColor = 'black';
    bgColor = 'oklch(72.77% 0.1798 128.27)';
  }
  if (negative) {
    textColor = 'black';
    bgColor = 'oklch(51.73% 0.2119 28.74)';
  }
  return <div style={{
    display: 'inline-block',
    fontWeight: 'bold',
    paddingLeft: '4px',
    paddingRight: '4px',
    border: '1px solid',
    borderRadius: '8px',
    color: textColor,
    backgroundColor: bgColor
  }}>
      {text}
    </div>;
};

* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> หากติดปัญหาในการทำงาน ต้องแจ้งให้ คนในทีม/ผู้บริหาร รับรู้
  * เช่น ทำไม่ทันกรอบเวลาที่ประเมิน
  * เช่น ต้องทำในสิ่งที่ไม่มั่นใจ หรือ ตัดสินใจเองหรือภายในทีมไม่ได้
  * เช่น ไม่เข้าใจ requirement หรือ มีการเปลี่ยนแปลง
* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> ใช้ `UTF-8` file encode
* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.must } /> ใช้ `pnpm` เมื่อ project เป็น `node`
* <TextHighlight negative text={ CLASSIFICATION_TERMS.negative.must } /> ห้ามแก้ config ต่อไปนี้ โดยไม่มีการอนุมัติจาก ผู้บริหาร เว้นแต่ได้รับมอบหมายหรือสามารถรับผิดชอบ ต่อผลที่ตามมาได้
  * docker
  * eslint
  * vscode
* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.should } /> ใช้การลงท้ายบรรทัดแบบ `LF`
* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.should } /> ใช้ [VSCode](https://code.visualstudio.com/) (version 1.95 หรือ มากกว่า)
  * Extension ที่แนะนำ
    * [JS/TS](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next)
    * [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens)
    * [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
    * [GraphQL Language Support](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)
    * [GraphQL Syntax Highlight](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql-syntax)
    * [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
    * [PostCSS](https://marketplace.visualstudio.com/items?itemName=csstools.postcss)
* <TextHighlight positive text={ CLASSIFICATION_TERMS.positive.should } /> ควรแก้ไข warning และ error ให้หมด เพื่อความเรียบร้อยของงาน และ จะทำให้ debug ง่ายขึ้น
* <TextHighlight negative text={ CLASSIFICATION_TERMS.negative.should } /> ไม่ควรทิ้งโค้ดจำพวก `console` ไว้โดยไม่จำเป็น
  * หากไม่ได้ใช้งาน ต้องลบทิ้ง
