'use client';

import React from 'react';
import { Card } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { Search } from 'lucide-react';

interface RoleSearchProps {
  searchKeyword: string;
  onSearchChange: (keyword: string) => void;
}

export function RoleSearch({ searchKeyword, onSearchChange }: RoleSearchProps) {
  return (
    <Card className="p-4">
      <div className="relative">
        <Search className="absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground" />
        <Input
          placeholder="搜索角色名称、代码、描述..."
          value={searchKeyword}
          onChange={(e) => onSearchChange(e.target.value)}
          className="pl-10"
        />
      </div>
    </Card>
  );
}